Skip to content

Commit 4207af6

Browse files
authored
Update examples and tests (#44)
* Update examples and tests
1 parent fafd032 commit 4207af6

File tree

7 files changed

+24
-1
lines changed

7 files changed

+24
-1
lines changed

examples/asg-dns-agent/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# ASG DNS Agent
2+
3+
## Purpose
4+
5+
Configuration in this directory creates a minimal set of resources used to demonstrate the ability of the module to create Route53 records for autoscaling groups. This example is also used in the Terratest unit tests.
6+
7+
## Requirements
8+
9+
- [Terraform](https://www.terraform.io/downloads.html) 0.12+
10+
- [Terraform AWS provider](https://github.com/terraform-providers/terraform-provider-aws) 2.0+
11+
12+
## Usage
13+
14+
To run this example :
15+
16+
```
17+
$ terraform init
18+
$ terraform plan
19+
$ terraform apply
20+
```
File renamed without changes.
File renamed without changes.

example/asg-dns-agent/variables.tf renamed to examples/asg-dns-agent/variables.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
variable "instance_type" {
2+
description = "Size of the EC2 instance"
23
default = "t2.medium"
34
}
45

56
variable "min_size" {
7+
description = "Minimum number of instances in the autoscaling group"
68
default = "1"
79
}
810

911
variable "max_size" {
12+
description = "Maximum number of instances in the autoscaling group"
1013
default = "3"
1114
}
1215

File renamed without changes.

terratest/test/asg_dns_handler_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func TestAwsDnsRecordName(t *testing.T) {
2323

2424
//Specify the path where Terraform code to be tested is loacated
2525
terraformOptions := &terraform.Options{
26-
TerraformDir: "../../example/asg-dns-agent",
26+
TerraformDir: "../../examples/asg-dns-agent",
2727
}
2828

2929
// At the end of the test, run `terraform destroy` to clean up any resources that were created

0 commit comments

Comments
 (0)