-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Should this be ami?
locals {
name_prefix = var.name_prefix != "" ? "${var.name_prefix}-" : ""
images_byol = jsondecode(data.http.avx_iam_id.body).BYOL
images_platinum = jsondecode(data.http.avx_iam_id.body).MeteredPlatinum
images_custom = jsondecode(data.http.avx_iam_id.body).Custom
images_copilot = jsondecode(data.http.avx_iam_id.body).MeteredPlatinumCopilot
ami_id = var.type == "MeteredPlatinumCopilot"? local.images_copilot[data.aws_region.current.name] : ( var.type == "Custom" ? local.images_custom[data.aws_region.current.name] : (var.type == "BYOL" || var.type == "byol" ? local.images_byol[data.aws_region.current.name] : local.images_platinum[data.aws_region.current.name]))
common_tags = merge(
var.tags, {
module = "aviatrix-controller-build"
Createdby = "Terraform+Aviatrix"
})
}
data http avx_iam_id {
url = "https://s3-us-west-2.amazonaws.com/aviatrix-download/AMI_ID/ami_id.json"
request_headers = {
"Accept" = "application/json"
}
}