terraform-provider-google icon indicating copy to clipboard operation
terraform-provider-google copied to clipboard

cloudrun Service issue when going from launch-stage:beta to launch-stage:ga

Open bskaplan opened this issue 6 months ago • 9 comments

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.9.3 on linux_amd64

  • provider registry.terraform.io/hashicorp/google-beta v5.42.0

Affected Resource(s)

google_cloud_run_service

Terraform Configuration

see test at https://github.com/GoogleCloudPlatform/magic-modules/blob/bc5def9f8136003836911e78567dc8849a39be6d/mmv1/third_party/terraform/services/cloudrun/resource_cloud_run_service_test.go.erb#L1315

Debug Output

https://gist.github.com/bskaplan/560b83679746aa53fdd6ff24f8b89cdf

Expected Behavior

Test should have completed successfully

Actual Behavior

There was an unexpected diff in effective_annotations for run.googleapis.com/launch-stage

Steps to reproduce

  1. terraform apply a service with a feature that is in beta and set the annotation run.googleapis.com/launch-stage: beta.
  2. update the cloud_run_service config to not depend on any beta features and terraform apply again

Important Factoids

The launch-stage annotation in Cloud Run is a bit weird. On input, it represents the launch stage that you want to allow for new features. The server will respond with the launch stage required for the features used. So if you deploy with launch-stage: BETA but do not use any beta features, the launch stage annotation is removed from the response.

References

This came up while working on https://github.com/GoogleCloudPlatform/magic-modules/pull/11503

bskaplan avatar Aug 21 '24 17:08 bskaplan