Add ceritificateManagerCertificates field to ComputeTargetHttpsProxy resource #6460
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add new field
certificateManagerCertificates
in the resourcecompute_target_https_proxy
.Context:
The resource
ComputeTargetHttpsProxy
has a field calledsslCertificates
, this field used to reference only ssl certificates. Recently, certificates of typeCertificateManagerCertificates
has been allowed. However, either all the items of thesslCertificates
array will be sslCertificates or certificate manager certificates.Furthermore, the field in TF couldn't accept certificate manager certificates because of a custom_expand function that only validates compute certificates (sslcertificates). A solution by @DanielRieske (GoogleCloudPlatform/magic-modules#8941) that should enable using the field with both types of certificates.
The solution suggested here is to use a new field
certificate_manager_certificates
, that should be used with the customer wants to reference a certificate manager certificate resources. Since this field doesn't exist in the API, I used encoder/decoder to change the the API request/response as needed.[+] This is consistent with
gcloud
behaviour, as the customer enters the certificate manager certificates in a new field.[+] Since it's not allowed to use mixed type of certificates in the array, it might make more sense to use different fields that are mutual exclusive.
[-] Adding a new field isn't consistent with the API definition of
computeTargetHttpsProxy
We will confirm with
compute
team which solution is desired.Fixes: hashicorp/terraform-provider-google#15805
Release Note Template for Downstream PRs (will be copied)
Derived from GoogleCloudPlatform/magic-modules#9144