Skip to content

Commit

Permalink
fix a bug which cause crl_access_urls not being populated (#5436) (#3861
Browse files Browse the repository at this point in the history
)

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Nov 17, 2021
1 parent a96bf39 commit d97dde4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .changelog/5436.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
privateca: fixed crlAccessUrls in `CertificateAuthority `
```
13 changes: 8 additions & 5 deletions google-beta/resource_privateca_certificate_authority.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,14 @@ issue certificates. Default value: "SELF_SIGNED" Possible values: ["SELF_SIGNED"
Description: `The URL where this CertificateAuthority's CA certificate is published. This will only be
set for CAs that have been activated.`,
},
"crl_access_url": {
Type: schema.TypeString,
"crl_access_urls": {
Type: schema.TypeList,
Computed: true,
Description: `The URL where this CertificateAuthority's CRLs are published. This will only be set for
CAs that have been activated.`,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
},
},
Expand Down Expand Up @@ -1101,15 +1104,15 @@ func flattenPrivatecaCertificateAuthorityAccessUrls(v interface{}, d *schema.Res
transformed := make(map[string]interface{})
transformed["ca_certificate_access_url"] =
flattenPrivatecaCertificateAuthorityAccessUrlsCaCertificateAccessUrl(original["caCertificateAccessUrl"], d, config)
transformed["crl_access_url"] =
flattenPrivatecaCertificateAuthorityAccessUrlsCrlAccessUrl(original["crlAccessUrl"], d, config)
transformed["crl_access_urls"] =
flattenPrivatecaCertificateAuthorityAccessUrlsCrlAccessUrls(original["crlAccessUrls"], d, config)
return []interface{}{transformed}
}
func flattenPrivatecaCertificateAuthorityAccessUrlsCaCertificateAccessUrl(v interface{}, d *schema.ResourceData, config *Config) interface{} {
return v
}

func flattenPrivatecaCertificateAuthorityAccessUrlsCrlAccessUrl(v interface{}, d *schema.ResourceData, config *Config) interface{} {
func flattenPrivatecaCertificateAuthorityAccessUrlsCrlAccessUrls(v interface{}, d *schema.ResourceData, config *Config) interface{} {
return v
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ In addition to the arguments listed above, the following computed attributes are
The URL where this CertificateAuthority's CA certificate is published. This will only be
set for CAs that have been activated.

* `crl_access_url` -
* `crl_access_urls` -
The URL where this CertificateAuthority's CRLs are published. This will only be set for
CAs that have been activated.

Expand Down

0 comments on commit d97dde4

Please sign in to comment.