Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interpolate: expose aws_secretsmanager_raw func
The current implementation of the aws_secretsmanager function works in most cases, however there's one missing capability to it: raw fetching a key-value secret from AWS. In case the secret is a plaintext secret, the aws_secretsmanager function will return the secret as-is, ignoring the key completely. If however the secret is a key-value object, the function fails without a key being provided, which can be a hassle for users declaring multiple secrets that they want to fetch at once, as right now they have to progamatically get the attributes one-by-one with a dynamic/for-loop expression, or define the function as many times as there are keys to fetch. This is not ideal for those users, therefore as introduced with the parent commit, a new alternative that forces fetching a raw secret from secretmanager has been added to address this case. This commit builds upon this change, by exposing the function to the interpolation context. This does not make the function available in an HCL2 context however, and for this we should add that to Packer core. There also should be a change committed to the AWS plugin so the secrets manager data source supports this use case in the future.
- Loading branch information