@nathandench
https://ndench.github.io
#BrisPHP
From "interested but scared" to never manually provisioning infrastructure again
Terraform the hard parts
Terraform the hard parts
Terraform the hard parts
$ cd terraform
$ terraform import aws_vpc.this vpc-a01106c2
Successfully imported!
$ terraform import aws_internet_gateway.this igw-c0a643a9
Successfully imported!
$ terraform import aws_subnet.public subnet-9d4a7b6c
Successfully imported!
$ terraform import aws_subnet.private subnet-9d4a7b6c
Successfully imported!
$ terraform import aws_nat_gateway.this nat-05dba92075d71c408
Successfully imported!
terraform/
├─ main.tf
Custom modules
$ terraform state aws_vpc.this module.infra.aws_vpc.this
Successfully moved!
$ terraform state mv aws_internet_gateway.this module.infra.aws_internet_gateway.this
Successfully moved!
$ terraform state mv aws_subnet.public module.infra.aws_subnet.public
Successfully moved!
$ terraform state mv aws_subnet.private module.infra.aws_subnet.private
Successfully moved!
$ terraform state mv aws_nat_gateway.this module.infra.aws_nat_gateway.this
Successfully moved!
Custom modules
terraform/
├─ modules/
│ ├─ main.tf
├─ staging/
│ ├─ main.tf
├─ producton/
│ ├─ main.tf
Third party modules
Third party modules
@nathandench
https://ndench.github.io
#BrisPHP