Created
May 1, 2020 09:10
-
-
Save valery-zhurbenko/e6189941a239dec8bf51763f86826ed8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable create_web_vm { | |
default = false | |
} | |
resource "aws_instance" "web" { | |
### If create_web_vm variable is "true" - one aws_instance.web resource will be created. If false create zero aws_instance.web resources | |
count = "${var.create_web_vm ? 1: 0}" | |
ami = "AL2_x86_64" | |
instance_type = "t2.micro" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment