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

Permadiff in Cloud Run module #1435

Closed
ludoo opened this issue Jun 12, 2023 · 2 comments
Closed

Permadiff in Cloud Run module #1435

ludoo opened this issue Jun 12, 2023 · 2 comments
Assignees

Comments

@ludoo
Copy link
Collaborator

ludoo commented Jun 12, 2023

 # module.cloud-run-1-0.google_cloud_run_service.service will be updated in-place
  ~ resource "google_cloud_run_service" "service" {
        id                         = "locations/europe-west1/namespaces/tf-playground-svpc-cr-1/services/test-0"
        name                       = "test-0"
        # (4 unchanged attributes hidden)

      ~ template {
          ~ metadata {
              ~ labels      = {
                  - "run.googleapis.com/startupProbeType" = "Default" -> null
                }
                # (2 unchanged attributes hidden)
            }
          ~ spec {
                # (3 unchanged attributes hidden)

              ~ containers {
                  + args    = []
                  + command = []
                    # (1 unchanged attribute hidden)

                    # (3 unchanged blocks hidden)
                }
            }
        }

        # (2 unchanged blocks hidden)
    }
@wiktorn wiktorn self-assigned this Jun 13, 2023
@wiktorn
Copy link
Collaborator

wiktorn commented Jun 13, 2023

I can reproduce the run.googleapis.com/startupProbeType but no idea how to reproduce args, command.

@ludoo can you double check and post example?

I'm using:

+ provider registry.terraform.io/hashicorp/google v4.66.0
+ provider registry.terraform.io/hashicorp/google-beta v4.66.0

@ludoo
Copy link
Collaborator Author

ludoo commented Jun 13, 2023

module "cloud-run-1-0" {
  source     = "../cloud-foundation-fabric/modules/cloud-run"
  project_id = module.project-svc-cr-1.project_id
  name       = "test-0"
  region     = "europe-west1"
  containers = {
    hello = {
      image = "europe-west1-docker.pkg.dev/tf-playground-svpc-ar-0/test-0/nginx-hello:plain-text"
      ports = {
        http = {
          container_port = 80
        }
      }
    }
  }
  ingress_settings = "internal-and-cloud-load-balancing"
  depends_on       = [module.project-svc-ar-0]
}

but don't worry, it was more like a self-memo to remember to get to it sooner or later

@ludoo ludoo self-assigned this Jun 13, 2023
wiktorn added a commit to wiktorn/cloud-foundation-fabric that referenced this issue Jun 13, 2023
Ignore explicitly:
* metadata.0.annotations["run.googleapis.com/operation-id"],
* template.0.metadata.0.labels["run.googleapis.com/startupProbeType"]

To remove permdiff in terraform plan. Not ignoring all changes in
annotations as it implements some of the functionality and it prevents
detecting drift.

Related: GoogleCloudPlatform#1435, GoogleCloudPlatform#1269
@wiktorn wiktorn removed their assignment Jun 13, 2023
wiktorn added a commit that referenced this issue Jun 13, 2023
Ignore explicitly:
* metadata.0.annotations["run.googleapis.com/operation-id"],
* template.0.metadata.0.labels["run.googleapis.com/startupProbeType"]

To remove permdiff in terraform plan. Not ignoring all changes in
annotations as it implements some of the functionality and it prevents
detecting drift.

Related: #1435, #1269
@ludoo ludoo closed this as completed Jun 26, 2023
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