- Default VPC and Default Availability Zones (a, b, c) created
- Using a module in terraform.
The module will take some inputs and achieve some functionality.
- Generate the keys (the ones commited are for sample only)
- Run the following to download the module to your local
$ terraform get
Downloading github.com/wardviaene/terraform-consul-module.git?ref=terraform-0.12 for consul...
- consul in .terraform/modules/consul
- Module that will get downloaded after this would be
$ cd .terraform
$ tree
.
└── modules
├── consul
│ ├── README.md
│ ├── consul.tf
│ ├── outputs.tf
│ ├── shared
│ │ └── scripts
│ │ ├── debian_consul.service
│ │ ├── debian_upstart.conf
│ │ ├── install.sh
│ │ ├── ip_tables.sh
│ │ ├── rhel_consul.service
│ │ ├── rhel_upstart.conf
│ │ └── service.sh
│ └── variables.tf
└── modules.json
terraform plan -var-file=../../terraform.tfvars
terraform apply -var-file=../../terraform.tfvars
- You can login into the instance using mykey
$ ssh -i mykey ubuntu@54.87.20.78
.
.
.
ubuntu@ip-172-31-39-91:~$
terraform destroy -var-file=../../terraform.tfvars