Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Healtchecks - Provider produced inconsistent result after apply #354

Open
MikeAtJulaya opened this issue Feb 14, 2024 · 1 comment
Open

Comments

@MikeAtJulaya
Copy link

Hi team 👋🏼

I create a terraform qovery module for a compliant, secure and sharable ready to go for the team.

For the healtchecks my module add default values when not passed, cause there are required.

But I think for the type there is a missing control:

My input:

 ~ healthchecks                   = {
          + liveness_probe  = {
              + failure_threshold     = 3
              + initial_delay_seconds = 30
              + period_seconds        = 10
              + success_threshold     = 1
              + timeout_seconds       = 10
              + type                  = {}
            }
          + readiness_probe = {
              + failure_threshold     = 3
              + initial_delay_seconds = 30
              + period_seconds        = 10
              + success_threshold     = 1
              + timeout_seconds       = 10
              + type                  = {}
            }
        }

The error:

 Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ module.mymodule.qovery_application.this["mymodule-worker"], provider
│ "provider[\"registry.terraform.io/qovery/qovery\"]" produced an unexpected
│ new value: .healthchecks.readiness_probe: was
│ cty.ObjectVal(map[string]cty.Value{"failure_threshold":cty.NumberIntVal(3),
│ "initial_delay_seconds":cty.NumberIntVal(30),
│ "period_seconds":cty.NumberIntVal(10),
│ "success_threshold":cty.NumberIntVal(1),
│ "timeout_seconds":cty.NumberIntVal(10),
│ "type":cty.ObjectVal(map[string]cty.Value{"exec":cty.NullVal(cty.Object(map[string]cty.Type{"command":cty.List(cty.String)})),
│ "grpc":cty.NullVal(cty.Object(map[string]cty.Type{"port":cty.Number,
│ "service":cty.String})),
│ "http":cty.NullVal(cty.Object(map[string]cty.Type{"path":cty.String,
│ "port":cty.Number, "scheme":cty.String})),
│ "tcp":cty.NullVal(cty.Object(map[string]cty.Type{"host":cty.String,
│ "port":cty.Number}))})}), but now null.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.

If I create a port and add a type (http for example), it's working without errors:

+ healthchecks                   = {
          + liveness_probe  = {
              + failure_threshold     = 3
              + initial_delay_seconds = 30
              + period_seconds        = 10
              + success_threshold     = 1
              + timeout_seconds       = 10
              + type                  = {
                  + http = {
                      + path   = "/"
                      + port   = 3000
                      + scheme = "HTTP"
                    }
                }
            }
          + readiness_probe = {
              + failure_threshold     = 3
              + initial_delay_seconds = 30
              + period_seconds        = 10
              + success_threshold     = 1
              + timeout_seconds       = 10
              + type                  = {
                  + http = {
                      + path   = "/"
                      + port   = 3000
                      + scheme = "HTTP"
                    }
                }
            }
        }
      + ports                          = [
          + {
              + id                  = (known after apply)
              + internal_port       = 3000
              + is_default          = true
              + name                = "worker"
              + protocol            = "HTTP"
              + publicly_accessible = false
            },
        ]

Why I would not have a type? idk it was a test for a worker ^^

cheers 🍺

@evoxmusic
Copy link
Contributor

Much appreciated @MikeAtJulaya 🙏🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants