Skip to content

Healtchecks - Provider produced inconsistent result after apply  #354

@MikeAtJulaya

Description

@MikeAtJulaya

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 🍺

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions