pulumi / pulumi-gcp

A Google Cloud Platform (GCP) Pulumi resource package, providing multi-language access to GCP
Apache License 2.0
183 stars 53 forks source link

GCP: does not disable prometheus in GKE #1439

Closed dit-darius closed 6 months ago

dit-darius commented 11 months ago

What happened?

I was creating a GKE cluster and set this

                managed_prometheus=gcp.container.ClusterMonitoringConfigManagedPrometheusArgs(
                    enabled=False
                ),

However, the created cluster had Prometheus enabled and gpm namespace and pods created in my cluster.

After disabling managedPrometheus manually via GCP console `pulumi refresh' picked on the change and reported it

      ~ monitoringConfig              : {
            advancedDatapathObservabilityConfigs: [
                [0]: {
                    enableMetrics: false
                    relayMode    : ""
                }
            ]
          ~ managedPrometheus                   : {
              ~ enabled: true => false
            }
        }

but 'pulumi preview --diff` did not identify any differences between actual state and configured state neither before refresh nor after.

Example

                managed_prometheus=gcp.container.ClusterMonitoringConfigManagedPrometheusArgs(
                    enabled=False
                ),

Output of pulumi about

$ pulumi about
CLI          
Version      3.96.2
Go Version   go1.21.4
Go Compiler  gc

Plugins
NAME    VERSION
gcp     6.67.1
python  unknown

Host     
OS       linuxmint
Version  21.1
Arch     x86_64

This project is written in python: executable='/usr/bin/python3' version='3.10.12'

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/Irmas
User           Irmas
Organizations  Irmas, <HIDDEN>
Token type     personal

Dependencies:
NAME        VERSION
pip         23.3.1
pulumi-gcp  6.67.1
setuptools  69.0.2
wheel       0.42.0

Pulumi locates its logs in /tmp by default
warning: Failed to get information about the current stack: No current stack

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

dit-darius commented 11 months ago

I think I'm facing the same problem with logging_config and monitoring_service.

I can't verify because for some reason I can't disable them in GCP console (I can uncheck the checkbox, but after I hit "save" and reopen the "Edit" modal it's enabled again)

Regardless, Pulumi does not notice the discrepancy between desired config with those services disabled and the actual state where they are enabled

iwahbe commented 11 months ago

Hi @dit-darius. Thanks for reporting this to us. I'm sorry this isn't working for you. Could you please provide a complete program that reproduces the problem?


May be related to https://github.com/hashicorp/terraform-provider-google/issues/10805