Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keyvault_certificate: Store raw data as hex #4335

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azurerm/resource_arm_key_vault_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ func resourceArmKeyVaultCertificateRead(d *schema.ResourceData, meta interface{}
d.Set("secret_id", cert.Sid)

if contents := cert.Cer; contents != nil {
d.Set("certificate_data", string(*contents))
d.Set("certificate_data", strings.ToUpper(hex.EncodeToString(*contents)))
}

if v := cert.X509Thumbprint; v != nil {
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/key_vault_certificate.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ The following attributes are exported:
* `id` - The Key Vault Certificate ID.
* `secret_id` - The ID of the associated Key Vault Secret.
* `version` - The current version of the Key Vault Certificate.
* `certificate_data` - The raw Key Vault Certificate.
* `thumbprint` - The X509 Thumbprint of the Key Vault Certificate returned as hex string.
* `certificate_data` - The raw Key Vault Certificate data represented as a hexadecimal string.
* `thumbprint` - The X509 Thumbprint of the Key Vault Certificate represented as a hexadecimal string.


## Import
Expand Down