1
0
Fork 0

using ternary condition

This commit is contained in:
Cedric Girard 2020-05-13 12:49:55 +02:00
parent fcac3117d1
commit 06950b2c84
Signed by: X-dark
GPG Key ID: E7D0E125DB9519E4
1 changed files with 15 additions and 0 deletions

15
project6/base.tf Normal file
View File

@ -0,0 +1,15 @@
variable "doit" {}
provider "aws" {
region = "eu-west-2"
}
resource "aws_instance" "instance1" {
count = var.doit == "foo" ? 0 : 2
ami = "ami-01a6e31ac994bbc09"
instance_type = "t2.micro"
key_name = "cedric"
tags = {
Name = "cedric-instance1"
}
}