File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,23 +56,37 @@ infraspec init # This will create a ./features directory if it doesn't already e
5656Copy and paste the following into a Terraform configuration:
5757
5858``` hcl filename="main.tf" copy
59- provider "aws" {
60- region = "us-east-1"
59+ output "hello_world" {
60+ description = "Hello World"
61+ value = "Hello, World!"
6162}
6263```
6364
6465### Create Your First Test
6566
66- Create your first infrastructure test:
67+ Create your first test scenario :
6768
6869``` sh
69- infraspec new dynamodb.feature
70+ infraspec new terraform.feature
71+ ```
72+
73+ ### Copy the feature code
74+
75+ Copy and paste the following into the ` terraform.feature ` :
76+
77+ ``` gherkin filename="terraform.feature" copy
78+ Feature: Terraform Hello World
79+
80+ Scenario: Run a simple test
81+ Given the Terraform module at "../examples/terraform/hello-world"
82+ When I run terraform apply
83+ Then the "hello_world" output is "Hello, World!"
7084```
7185
7286### Run it!
7387
7488``` sh
75- infraspec features/dynamodb .feature
89+ infraspec features/terraform .feature
7690```
7791
7892You should see some output.
You can’t perform that action at this time.
0 commit comments