Skip to content

Commit b1a5424

Browse files
authored
Update the example to context.tf (#70)
* Update the example to `context.tf` * Update the example to `context.tf`
1 parent 05b3362 commit b1a5424

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/complete/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ module "subnets" {
3434
}
3535

3636
module "ec2_instance" {
37-
source = "../../"
38-
namespace = var.namespace
39-
stage = var.stage
40-
name = var.name
37+
source = "../../"
38+
4139
ssh_key_pair = module.aws_key_pair.key_name
4240
vpc_id = module.vpc.vpc_id
4341
subnet = module.subnets.private_subnet_ids[0]
@@ -47,4 +45,6 @@ module "ec2_instance" {
4745
instance_type = var.instance_type
4846
allowed_ports = var.allowed_ports
4947
allowed_ports_udp = var.allowed_ports_udp
48+
49+
context = module.this.context
5050
}

test/src/examples_complete_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ func TestExamplesComplete(t *testing.T) {
6464
// Run `terraform output` to get the value of an output variable
6565
role := terraform.Output(t, terraformOptions, "role")
6666
// Verify we're getting back the outputs we expect
67-
assert.Equal(t, "eg-test-ec2-instance", role)
67+
assert.Equal(t, "eg-test-ec2-instance-"+randId, role)
6868
}

0 commit comments

Comments
 (0)