Skip to content

Setting min_instance_count = 0 causes google_cloud_run_v2_service to show diffs on every plan even after a successful apply #25457

@frozenbonito

Description

@frozenbonito

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Terraform Version & Provider Version(s)

Terraform v1.14.1
on linux_amd64

  • provider registry.terraform.io/hashicorp/google v7.12.0

Affected Resource(s)

  • google_cloud_run_v2_service

Terraform Configuration

resource "google_cloud_run_v2_service" "default" {
  name     = "cloudrun-service"
  location = "us-central1"
  deletion_protection = false
  ingress = "INGRESS_TRAFFIC_ALL"

  scaling {
    min_instance_count = 0
  }

  template {
    containers {
      image = "us-docker.pkg.dev/cloudrun/container/hello"
    }
  }

  depends_on = [ google_project_service.run ]
}

resource "google_project_service" "run" {
    service = "run.googleapis.com"
}

Debug Output

No response

Expected Behavior

After a successful terraform apply, subsequent terraform plan runs should show no diffs.

Actual Behavior

Even after a successful terraform apply, subsequent terraform plan runs continue to show diffs.

Steps to reproduce

  1. terraform apply
  2. terraform plan
Terraform will perform the following actions:

  # google_cloud_run_v2_service.default will be updated in-place
  ~ resource "google_cloud_run_v2_service" "default" {
        id                      = "projects/frozenbonito-development/locations/us-central1/services/cloudrun-service"
        name                    = "cloudrun-service"
        # (34 unchanged attributes hidden)

      + scaling {
          + min_instance_count = 0
        }

        # (2 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Important Factoids

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions