terraform {
required_version = "~> 0.12"
backend "s3" {
# ...
}
required_providers {
# ...
}
}
terraform {
required_version = "~> 0.12.4"
# ...
}A. Exclusively version 0.12.4
B. Anything greater version 0.12.4
C. Any other than version 0.12.4
D. Version 0.12.4 and up, excluding version 0.13 and above
A. Any version below 0.14
B. Version 0.12.20 and up, including 0.14
C. Version 0.12.21 and up, excluding versions above 0.14.1
D. Version 0.12.20 and up, excluding version 0.14 and above
terraform {
required_version = ">= 0.12.20, < 0.14"
# ...
}
A. Only version 0.13.1
B. Version 0.13.1 and above
C. Any version below 0.13.1
D. Any version other than 0.13.1
terraform {
required_version = "0.13.1"
# ...
}locals {
repo_names = toset([
"frontend",
"backend",
"auth",
"payments",
"reports",
"notifications"
])
}
module "ecr" {
for_each = local.repos_name
source = "cloudposse/terraform-aws-ecr"
version = "0.24.0"
name = each.value
scan_images_on_push = true
}variable "env" {
type = string
description = "The name of the SDLC environment. e.g. dev, stage, prod."
validation {
condition = contains(["dev", "stage", "prod"], var.env)
error_message = "`var.env` must be a pre-approved environment name."
}
}