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

Add CIDR limitation to OIDC IAM Role #422

Closed
alecsiemerink opened this issue Sep 13, 2023 · 3 comments
Closed

Add CIDR limitation to OIDC IAM Role #422

alecsiemerink opened this issue Sep 13, 2023 · 3 comments

Comments

@alecsiemerink
Copy link

Is your request related to a new offering from AWS?

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

  • Yes ✅: At least > V3

Is your request related to a problem? Please describe.

We want to secure our Terraform deployment pipelines which already use OIDC on a self-hosted GitHub Actions runner. We want to be able to limit the CIDR from which this role can be used.

Describe the solution you'd like.

In the module declaration, I want to be able to pass a CIDR list like this:

module "iam_github_oidc_role" {
  source    = "terraform-aws-modules/iam/aws//modules/iam-github-oidc-role"

  # This should be updated to suit your organization, repository, references/branches, etc.
  subjects = ["terraform-aws-modules/terraform-aws-iam:*"]

  policies = {
    S3ReadOnly = "arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess"
  }
  allowed_cidr = ['x.x.x.x/x", "x.x.x.x/x"]


  tags = {
    Environment = "test"
  }
}

Describe alternatives you've considered.

Doing this through the console:
image

Additional context

@github-actions
Copy link

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 Oct 14, 2023
@github-actions
Copy link

This issue was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2023
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant