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

Correctly update write-only properties. #1737

Merged
merged 10 commits into from
May 22, 2024
Merged

Correctly update write-only properties. #1737

merged 10 commits into from
May 22, 2024

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented May 22, 2024

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request
  • The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.

When updating a resource via the Cloud Control API write-only property changes must be sent as add, not update.
The safest way to do this is to null out any write-only attributes in the "pre" state before comparing with "post" state and building the JSON patch document.

Closes #1149.
Closes #1377.
Closes #1021.
Closes #1426.
Closes #1399.

% TF_LOG=ERROR make testacc PKG_NAME=internal/aws/ec2 TESTARGS='-run=TestAccAWSEC2LaunchTemplate_update'
TF_ACC=1 go test ./internal/aws/ec2 -v -count 1 -parallel 20 -run=TestAccAWSEC2LaunchTemplate_update -timeout 180m
=== RUN   TestAccAWSEC2LaunchTemplate_update
=== PAUSE TestAccAWSEC2LaunchTemplate_update
=== CONT  TestAccAWSEC2LaunchTemplate_update
--- PASS: TestAccAWSEC2LaunchTemplate_update (135.82s)
PASS
ok  	github.com/hashicorp/terraform-provider-awscc/internal/aws/ec2	136.668s
% TF_LOG=ERROR make testacc PKG_NAME=internal/aws/secretsmanager TESTARGS='-run=TestAccAWSSecretsManagerSecret_'
TF_ACC=1 go test ./internal/aws/secretsmanager -v -count 1 -parallel 20 -run=TestAccAWSSecretsManagerSecret_ -timeout 180m
=== RUN   TestAccAWSSecretsManagerSecret_basic
=== PAUSE TestAccAWSSecretsManagerSecret_basic
=== RUN   TestAccAWSSecretsManagerSecret_disappears
=== PAUSE TestAccAWSSecretsManagerSecret_disappears
=== RUN   TestAccAWSSecretsManagerSecret_update
=== PAUSE TestAccAWSSecretsManagerSecret_update
=== CONT  TestAccAWSSecretsManagerSecret_basic
=== CONT  TestAccAWSSecretsManagerSecret_update
=== CONT  TestAccAWSSecretsManagerSecret_disappears
--- PASS: TestAccAWSSecretsManagerSecret_basic (24.65s)
--- PASS: TestAccAWSSecretsManagerSecret_disappears (31.33s)
--- PASS: TestAccAWSSecretsManagerSecret_update (35.65s)
PASS
ok  	github.com/hashicorp/terraform-provider-awscc/internal/aws/secretsmanager	36.459s
% TF_LOG=ERROR make testacc PKG_NAME=internal/aws/iam TESTARGS='-run=TestAccAWSIAMUser_updatePassword'
TF_ACC=1 go test ./internal/aws/iam -v -count 1 -parallel 20 -run=TestAccAWSIAMUser_updatePassword -timeout 180m
=== RUN   TestAccAWSIAMUser_updatePassword
=== PAUSE TestAccAWSIAMUser_updatePassword
=== CONT  TestAccAWSIAMUser_updatePassword
--- PASS: TestAccAWSIAMUser_updatePassword (117.05s)
PASS
ok  	github.com/hashicorp/terraform-provider-awscc/internal/aws/iam	117.773s

@ewbankkit ewbankkit changed the title Correctly u[date write-only properties. Correctly update write-only properties. May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment