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

fix: External-secrets // fix IAM permissions for SA #1504

Closed

Conversation

daniel-ciaglia
Copy link

ssm:DescribeParameters seems to need a resource wildcard

What does this PR do?

Adds IAM permission for external-secrets SA to allow use of ssm:DescribeParameters on wildcard resource.

Motivation

More

  • Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)
  • Yes, I have updated the docs for this feature
    • not needed
  • Yes, I ran pre-commit run -a with this PR

For Moderators

  • E2E Test successfully complete before merge?

Additional Notes

TF plan run

  # module.eks_blueprints_kubernetes_addons.module.external_secrets[0].aws_iam_policy.external_secrets will be updated in-place
  ~ resource "aws_iam_policy" "external_secrets" {
        id          = "arn:aws:iam::<account>:policy/eks-external-secrets-irsa"
        name        = "eks-external-secrets-irsa"
      ~ policy      = jsonencode(
          ~ {
              ~ Statement = [
                  ~ {
                      ~ Resource = "arn:aws:ssm:*:*:parameter/*" -> [
                          + "arn:aws:ssm:eu-central-1:<account>:parameter/*",
                          + "arn:aws:ssm:*:*:parameter/*",
                        ]
                        # (3 unchanged elements hidden)
                    },
                  ~ {
                      ~ Resource = "arn:aws:secretsmanager:*:*:secret:*" -> [
                          + "arn:aws:secretsmanager:eu-central-1:<account>:secret:*",
                          + "arn:aws:secretsmanager:*:*:secret:*",
                        ]
                        # (3 unchanged elements hidden)
                    },
                  + {
                      + Action   = "ssm:DescribeParameters"
                      + Effect   = "Allow"
                      + Resource = "arn:aws:ssm:eu-central-1:<account>:*"
                      + Sid      = ""
                    },
                ]
                # (1 unchanged element hidden)
            }
        )
        tags        = {}
        # (5 unchanged attributes hidden)
    }

@daniel-ciaglia daniel-ciaglia requested a review from a team as a code owner March 20, 2023 18:04
@daniel-ciaglia daniel-ciaglia changed the title external-secrets // fix IAM permissions for SA fix: external-secrets // fix IAM permissions for SA Mar 20, 2023
@daniel-ciaglia daniel-ciaglia changed the title fix: external-secrets // fix IAM permissions for SA fix: External-secrets // fix IAM permissions for SA Mar 20, 2023
@bryantbiggs
Copy link
Contributor

thank you for the PR - any changes to the addons should be submitted to the new repository https://github.com/aws-ia/terraform-aws-eks-blueprints-addons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubernetes-addons/external-secrets // SA IAM permissions need wildcard to use find.path feature
2 participants