fix: Ensure that API key and secret are not shown in the Terrafom plan output#13
Merged
semyonmor merged 1 commit intoaquasecurity:mainfrom May 21, 2025
Merged
Conversation
…n output
I've been testing this module and I've realized that the values for `aqua_api_key` and `aqua_api_secret` are being shown in the Terraform plan output when the `single/lambda` module is used.
This is not an issue on the `single/trigger` module as these variables are marked as sensitive there and thus not shown.
Before:
```
# module.aqua_aws_onboarding.module.single[0].module.lambda.aws_lambda_invocation.generate_volscan_external_id_function will be created
+ resource "aws_lambda_invocation" "generate_volscan_external_id_function" {
+ function_name = (known after apply)
+ id = (known after apply)
+ input = jsonencode(
{
+ ApiUrl = "..."
+ AquaApiKey = <plaintext_api_key>
+ AquaSecretKey = <plaintext_api_secret>
+ AutoConnectApiUrl = "..."
}
)
+ lifecycle_scope = "CREATE_ONLY"
+ qualifier = "$LATEST"
+ result = (known after apply)
+ terraform_key = "tf"
+ triggers = (known after apply)
}
```
After:
```
# module.aqua_aws_onboarding.module.single[0].module.lambda.aws_lambda_invocation.generate_volscan_external_id_function will be created
+ resource "aws_lambda_invocation" "generate_volscan_external_id_function" {
+ function_name = (known after apply)
+ id = (known after apply)
+ input = (sensitive value)
+ lifecycle_scope = "CREATE_ONLY"
+ qualifier = "$LATEST"
+ result = (known after apply)
+ terraform_key = "tf"
+ triggers = (known after apply)
}
```
We use automated workflows to deploy Terraform code on GitHub, as such, we need to ensure that these values remain hidden.
Let me know what you think, thanks.
```
Terraform v1.11.4
aquasecurity/onboarding/aws v0.2.2
hashicorp/aws v5.57.0
hashicorp/http v3.4.5
hashicorp/external v2.3.4
hashicorp/archive v2.4.2
hashicorp/random v3.6.3
hashicorp/time v0.13.0
```
semyonm0r
approved these changes
May 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This fixes #12
I've been testing this module and I've realized that the values for
aqua_api_keyandaqua_api_secretare being shown in the Terraform plan output when thesingle/lambdamodule is used.This is not an issue on the
single/triggermodule as these variables are marked as sensitive there and thus not shown.Before:
After:
We use automated workflows to deploy Terraform code on GitHub, as such, we need to ensure that these values remain hidden. Let me know what you think, thanks.