hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.28k stars 1.72k forks source link

Add iap.enabled to google_compute_region_backend_service #17494

Closed c2thorn closed 1 month ago

c2thorn commented 6 months ago

Community Note

Description

Region Backend Service has a custom encoder to force send the iap block with iap.enabled = false if it doesn't exist in config: https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/templates/terraform/encoders/region_backend_service.go.erb#L15

This is causing a customer issue: b/310147789 With this encoder, the provider does not surface the iap.enabled field to users. This is additionally not correct because users should be allowed to send iap.enabled = false with other fields in the iap block configured.

https://github.com/GoogleCloudPlatform/magic-modules/pull/9581 fixes this by adding iap.enabled as a required field. This would be a breaking change, and we may consider a state upgrader to add the field for existing resources in the next major release.

New or Affected Resource(s)

Potential Terraform Configuration

References

b/310147789 https://github.com/GoogleCloudPlatform/magic-modules/pull/9581

melinath commented 6 months ago

Whatever happens for this should likely be replicated in google_compute_backend_service (the non-regional variant) so that they behave consistently. https://github.com/hashicorp/terraform-provider-google/issues/16585 tracks that request as well.

github-actions[bot] commented 1 week ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.