Code Monkey home page Code Monkey logo

Comments (6)

alencarsouza avatar alencarsouza commented on August 11, 2024 1

Was this bug already fixed?

from terraform-google-cloud-nat.

doonto avatar doonto commented on August 11, 2024 1

I doubt that.

Works for me, when


module "cloud-nat" {
    source                             = "terraform-google-modules/cloud-nat/google"
    project_id                         = var.projectId
    region                             = var.regionLong
    network                            = "vpc-0"
    create_router                      = true
    router                             = "nat-router-0"
    name                               = "nat-gateway-0"
    nat_ips                            = google_compute_address.address.*.self_link
}

from terraform-google-cloud-nat.

innovia avatar innovia commented on August 11, 2024

agree and the condition doesn't make sense at all

if someone were to use the value
nat_ip_allocate_option =true

the condition breaks
nat_ip_allocate_option = var.nat_ip_allocate_option ? var.nat_ip_allocate_option : local.default_nat_ip_allocate_option

would render to
nat_ip_allocate_option = true instead of nat_ip_allocate_option=MANUAL_ONLY

from terraform-google-cloud-nat.

github-actions avatar github-actions commented on August 11, 2024

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

from terraform-google-cloud-nat.

doonto avatar doonto commented on August 11, 2024

Got the same:
When
nat_ip_allocate_option = "AUTO_ONLY"
getting

│ 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 "AUTO_ONLY"
│ 
│ The condition expression must be of type bool.

and when setting it to
nat_ip_allocate_option = true
getting

│ Error: expected nat_ip_allocate_option to be one of [MANUAL_ONLY AUTO_ONLY], got true
│ 
│   with module.cloud-nat.google_compute_router_nat.main,
│   on .terraform/modules/cloud-nat/main.tf line 51, in resource "google_compute_router_nat" "main":
│   51:   nat_ip_allocate_option              = local.nat_ip_allocate_option

Either this parameter is not needed, or should be fixed. :)

from terraform-google-cloud-nat.

alencarsouza avatar alencarsouza commented on August 11, 2024

Indeed, without nat_ip_allocate_option works.

from terraform-google-cloud-nat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.