resource/aws_dms_certificate: Properly set certificate_wallet into Terraform state #11496
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.
Community Note
Reference: #9954
Reference: https://github.com/terraform-providers/terraform-provider-aws/blob/768341474a743c3db30610c6b434fed598d98cd8/aws/resource_aws_dms_certificate.go#L71
Release note for CHANGELOG:
Previously:
Here we perform the opposite
[]byte
tostring
conversion as compared to the creation function to prevent silently ignoring a type error in thed.Set()
call and fix drift detection for the attribute.Output from acceptance testing:
Aside: Its worth noting that this attribute is not acceptance tested and potentially may not work as given in Terraform 0.12+ if there are non UTF-8 characters in the value (e.g. the
file()
function will error). Generally[]byte
attributes must have base64 encoding/decoding added above and beyond the AWS Go SDK's handling, however I do not have intimate knowledge about this particular DMS functionality, so it may be okay. There are no bug reports and it would take a non-trivial amount of effort to create a valid Oracle Wallet acceptance test, so this fix is best effort with other similar fixes to allow us to continue working towards enabling thetfproviderlint
R004
check in the near future.