AWS/GCP/Azure with Terraform

TIP: Please make sure to read Getting started with programming tasks first.

You can start with our sample project that can be found on GitHub:

Automatic assessment

It is possible to automatically assess the solution provided by the candidate. Automatic assessment is based on the plan generated by Terraform and code quality measurements based on tflint linter.

Verification tests are performed with Open Policy Agent and rego rules included in the task that and hidden from the candidate during the test. Files containing verification tests will be added to the project after the candidate finishes the test and will be executed during the verification phase. Verification tests result will be used to calculate the final score.

Once the candidate submits their solution, the platform executes verification tests by creating a plan from the files provided by the candidate, and then it reads the output of the bats tests included in the task.

DevSkiller project descriptor

Terraform tasks can be configured with the DevSkiller project descriptor file:

  1. Create a devskiller.json file.

  2. Place it in the root directory of your project.

Here is an example project descriptor:

{ "verification": { "testNamePatterns": [ ".*Verification.*" ], 
"pathPatterns": [ "**verification/verify**" ] }, "terraform": {
"configureProvider": [ "aws" ] } }

You can find more details about the devskiller.json the =descriptor in our documentation.

To define the Terraform specific variables in the descriptor use the following pattern:

terraform.configureProvider - a list of providers to configure for the task. Here's the list of supported cloud providers:

Technical details for Terraform support

A terraform task must include a terraform directory with an empty file to ensure that terraform returns no error during the initialization of the task on the platform. This directory is also a place where a candidate provides their solution code to be evaluated.

Unless a task or a cloud provider requires providing additional configuration (e.g. *features {}* for *zurerm*) there is no need to put a configuration stanza for providers in a task, as all configuration is provided by the platform and our Terraform runtime uses read-only credentials with a limited scope and privileges.

Was this article helpful?
0 out of 0 found this helpful