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

Explicit task_exec_secret_arns #244

Open
sestrella opened this issue Dec 1, 2024 · 1 comment
Open

Explicit task_exec_secret_arns #244

sestrella opened this issue Dec 1, 2024 · 1 comment
Labels

Comments

@sestrella
Copy link
Contributor

Is your request related to a new offering from AWS?

Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.

  • No 🛑: please wait to file a request until the functionality is avaialble in the AWS provider
  • Yes ✅: please list the AWS provider version which introduced this functionality

Is your request related to a problem? Please describe.

Not a problem in and of itself; nevertheless, the primary motivation is to make it easier to limit the scope of the task_exec policy to only the secrets explicitly mentioned in the container_definitions section.

Describe the solution you'd like.

Limit the scope of the task_exec policy to only the secrets that are actually used within the container_definitions.

Describe alternatives you've considered.

Obtain the ARNs for all the secrets defined in the container_definitions and pass them to task_exec_secret_arns.

Additional context

Currently task_exec_secret_arns defaults to ["arn:aws:secretsmanager:*:*:secret:*"]; therefore, a flag could be introduced to change this behaviour so it grabs the secrets ARNs by looping over all container_definitions:

container_definitions_secrets = flatten([for k, v in module.container_definition : v.container_definition.secrets])
task_exec_secret_arns = var.explicit_task_exec_secret_arns ? [for v in local.container_definitions_secrets : v.valueFrom] : var.task_exec_secret_arns
Copy link

github-actions bot commented Jan 1, 2025

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale label Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant