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

[Bug]: Value retrieved from aws secrets manager is altered prior to storing in aws parameter store #33073

Open
lsnetsinger opened this issue Aug 17, 2023 · 2 comments
Labels
bug Addresses a defect in current functionality. service/secretsmanager Issues and PRs that pertain to the secretsmanager service. service/ssm Issues and PRs that pertain to the ssm service.

Comments

@lsnetsinger
Copy link

lsnetsinger commented Aug 17, 2023

Terraform Core Version

1.5.5

AWS Provider Version

v5.7.0

Affected Resource(s)

Retrieving the value using:

data "aws_secretsmanager_secret_version" "gcp_auth" {
  secret_id = "${substr(var.env, 0, 3)}/gcp_auth"
}

Storing the value using:

resource "aws_ssm_parameter" "gcp_auth" {
  name   = "/${var.env}-${var.app_name}/gcp_auth"
  type   = "SecureString"
  value  = data.aws_secretsmanager_secret_version.gcp_auth.secret_string
  key_id = data.aws_kms_key.parameter_store_kms_key.id

Expected Behavior

Value Stored Should be:
image

Actual Behavior

Value Received:
image

Value was changed before being stored in the parameter store. This should not be the case. The value should be stored the same way it was retrieved from the secrets manager

Relevant Error/Panic Output Snippet

No Errors or Panic

Terraform Configuration Files

This is not an error so I am not sure what logs to provide.

Steps to Reproduce

Store a key / value set in the secrets manager one with a private key

image

Try to retrieve and store the retrieved value in a parameter store encrypted parameter.

Debug Output

No errors

Panic Output

NA

Important Factoids

This is stored as sensitive information. I am thinking the issue may be with encryption and decryption.

References

I have none

Would you like to implement a fix?

None

@lsnetsinger lsnetsinger added the bug Addresses a defect in current functionality. label Aug 17, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added service/secretsmanager Issues and PRs that pertain to the secretsmanager service. service/ssm Issues and PRs that pertain to the ssm service. labels Aug 17, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Aug 17, 2023
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Aug 17, 2023
@lsnetsinger
Copy link
Author

Can someone please review this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/secretsmanager Issues and PRs that pertain to the secretsmanager service. service/ssm Issues and PRs that pertain to the ssm service.
Projects
None yet
Development

No branches or pull requests

2 participants