resource "aws_instance" "web" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
}
resource "aws_eip" "web_eip" {
depends_on = [aws_instance.web]
instance = aws_instance.web.id
}
aws_eip 리소스는 aws_instance.web이 생성된 후에 적용됨
'Terraform' 카테고리의 다른 글
Terraform - tfstate (0) | 2025.02.11 |
---|---|
Terraform - 변수 타입 (0) | 2025.02.10 |
Terraform - Variables ( variables.tf ) (0) | 2025.02.10 |
Terraform - Resource (0) | 2025.02.10 |