cloudposse / terraform-aws-iam-policy

Create an IAM policy from Terraform input
https://cloudposse.com/accelerate
Apache License 2.0
19 stars 15 forks source link

Adding optional policy name #20

Closed joshuabalduff closed 1 year ago

joshuabalduff commented 1 year ago

what

Allow for custom policy name if not default to module.this.id

why

Flexibility

nitrocode commented 1 year ago

Thank you for the PR. you should be able to use the name input and it will be the same value as module.this.id. Please comment if you have trouble.

joshuabalduff commented 1 year ago

Okay I will double check. This was to bypass the name module.this.id from adding a tenant, environment etc.. if not needed.

nitrocode commented 1 year ago

You can also do the following

module "policy" {
  source  = "..."
  version = "..."

  name = "banana"

  namespace   = ""
  tenant      = ""
  environment = ""
  stage       = ""
  attributes  = []

  # ...
}