Given the Terraform configuration below, in which order will the resources be created?
1. resource "aws_instance" "web_server" {
2. ami = "i-abdce12345"
3. instance_type = "t2.micro"
4. }
5. resource "aws_eip" "web_server_ip" {
6. vpc = true
7. instance = aws_instance.web_server.id
8. }
The EC2 instance labeled web_server is the implicit dependency as the aws_eip cannot be created until the aws_instance labeled web_server has been provisioned and the id is available.
Note that aws_s3_bucket.example is an explicit dependency.
Currently there are no comments in this discussion, be the first to comment!