enable the option nat_ip_allocate_option= "MANUAL_ONLY" get error Incorrect condition type
ibraheem-sarsour opened this issue · 1 comments
TL;DR
i trying to create in gcp nat and and associate it to exist address by the option "MANUAL_ONLY"
i get this error
│ Error: Incorrect condition type
│
│ on .terraform/modules/cloud-nat/main.tf line 29, in locals:
│ 29: nat_ip_allocate_option = var.nat_ip_allocate_option ? var.nat_ip_allocate_option : local.default_nat_ip_allocate_option
│ ├────────────────
│ │ var.nat_ip_allocate_option is "MANUAL_ONLY"
│
│ The condition expression must be of type bool.
Expected behavior
associate the cloud nat to the exist address
Observed behavior
│ Error: Incorrect condition type
│
│ on .terraform/modules/cloud-nat/main.tf line 29, in locals:
│ 29: nat_ip_allocate_option = var.nat_ip_allocate_option ? var.nat_ip_allocate_option : local.default_nat_ip_allocate_option
│ ├────────────────
│ │ var.nat_ip_allocate_option is "MANUAL_ONLY"
│
│ The condition expression must be of type bool.
Terraform Configuration
module "cloud-nat" {
source = "terraform-google-modules/cloud-nat/google"
version = "~> 1.2"
project_id = var.project_id
region = var.services_region
router = "services-router"
name = "services-nat"
nat_ip_allocate_option= "MANUAL_ONLY"
nat_ips = module.address.self_links
source_subnetwork_ip_ranges_to_nat = "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES"
}
Terraform Version
Terraform v1.1.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/google v3.90.1
+ provider registry.terraform.io/hashicorp/google-beta v4.13.0
+ provider registry.terraform.io/hashicorp/null v3.1.0
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0
Additional information
No response
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days