You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add ceritificateManagerCertificates field to ComputeTargetHttpsProxy resource (#9144) (#16179)
* Add ceritificateManagerCertificates field and handle the creation process using encoder and decoder
* Add custom_expand function that constructs the full URL if the provided input was relative self_link
* update the documetation of certificateManagerCertificates field
* Update the example
* Fix inconsistent spaces in the resource example
* Remove unnecessary ruby template in the custom_expand function
---------
[upstream:dc950684e5f0ee1389008bce9ff157ff62fe789d]
Signed-off-by: Modular Magician <[email protected]>
Description: `A list of Certificate Manager certificate URLs that are used to authenticate
82
+
connections between users and the load balancer. At least one resource must be specified.
83
+
Accepted format is '//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificates/{resourceName}' or just the self_link projects/{project}/locations/{location}/certificates/{resourceName}`,
84
+
Elem: &schema.Schema{
85
+
Type: schema.TypeString,
86
+
},
87
+
ConflictsWith: []string{"ssl_certificates"},
88
+
},
75
89
"certificate_map": {
76
90
Type: schema.TypeString,
77
91
Optional: true,
@@ -132,12 +146,13 @@ If left blank, communications are not encrypted.`,
132
146
"ssl_certificates": {
133
147
Type: schema.TypeList,
134
148
Optional: true,
135
-
Description: `A list of SslCertificate resource URLs or Certificate Manager certificate URLs that are used to authenticate
149
+
Description: `A list of SslCertificate resource URLs that are used to authenticate
136
150
connections between users and the load balancer. At least one resource must be specified.`,
// Any full URL will be passed to the API request (regardless of the resource type). This is to allow self_links of CertificateManagerCeritificate resources.
852
+
// If the full URL is an invalid reference, that should be handled by the API.
// If the input is the id pattern of CertificateManagerCertificate resource, a prefix will be added to construct the full URL before constructing the API request.
returnnil, fmt.Errorf("Invalid value for certificate_manager_certificates: %v is an invalid format for a certificateManagerCertificate resource", raw.(string))
860
+
}
861
+
}
862
+
returnreq, nil
863
+
}
864
+
789
865
funcexpandComputeTargetHttpsProxySslCertificates(vinterface{}, d tpgresource.TerraformResourceData, config*transport_tpg.Config) (interface{}, error) {
790
866
l:=v.([]interface{})
791
867
req:=make([]interface{}, 0, len(l))
@@ -833,3 +909,34 @@ func expandComputeTargetHttpsProxyHttpKeepAliveTimeoutSec(v interface{}, d tpgre
833
909
funcexpandComputeTargetHttpsProxyServerTlsPolicy(vinterface{}, d tpgresource.TerraformResourceData, config*transport_tpg.Config) (interface{}, error) {
// It is enough to check only the type of one of the provided certificates beacuse all the certificates should be the same type.
936
+
log.Printf("[DEBUG] The field sslCertificates contains certificateManagerCertificates, the field name will be converted to certificateManagerCertificates")
name = "tf-test-target-http-proxy%{random_suffix}"
223
+
url_map = google_compute_url_map.default.id
224
+
certificate_manager_certificates = ["//certificatemanager.googleapis.com/${google_certificate_manager_certificate.default.id}"] # [google_certificate_manager_certificate.default.id] is also acceptable
0 commit comments