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 role_tags variable: Tag based resource access #333

Closed
kayman-mk opened this issue Jul 2, 2021 · 0 comments
Closed

Add role_tags variable: Tag based resource access #333

kayman-mk opened this issue Jul 2, 2021 · 0 comments

Comments

@kayman-mk
Copy link
Collaborator

We usually use tag based resource access (especially if the resources are in a different accounts). For this you have to add a tag to the iam_role.

resource "aws_iam_role" "xyz" {
  name               = "name"
  description        = "description"
  assume_role_policy = data.aws_iam_policy_document.assume_role.json

  tags = merge(local.tags, tomap({ "allowReadPlatformCredentials" : "gitlab-ci-runner" }))
}

Add the moment it is not possible to add a tag to the iam_role only. I know that I can set the tags but this adds the tag to nearly all resources which is not needed.

I propose to add a role_tags variable. Those tags are attached to the iam_role only. What do you think?

@kayman-mk kayman-mk changed the title Tag based resource access Add role_tags variable: Tag based resource access Jul 2, 2021
kayman-mk added a commit to kayman-mk/terraform-aws-gitlab-runner that referenced this issue Jul 3, 2021
npalm pushed a commit that referenced this issue Jul 8, 2021
semantic-releaser bot pushed a commit that referenced this issue Jul 8, 2021
## [4.26.0](4.25.0...4.26.0) (2021-07-08)

### Features

* Add `role_tags` to support tag based authorization ([#333](#333)) ([#335](#335)) ([c81f221](c81f221))
* Make disable_cache configurable ([#324](#324)) ([d726cf4](d726cf4))
* replace default volume type gp2 by gp3  ([#338](#338)) ([1bfaf2b](1bfaf2b)), closes [#318](#318)
* upgrade default runner version to 14.0.1 ([#341](#341)) ([18b4103](18b4103))

### Bug Fixes

* add tags for instance profile ([#331](#331)) ([b42712f](b42712f))
* Remove deprecarted null_data_source ([#332](#332)) ([#334](#334)) ([b3ab3f6](b3ab3f6))
* replace deprecated null_data_source with locals ([#336](#336)) ([6a240c9](6a240c9))
* support terraform 1.x ([800c264](800c264)), closes [#330](#330)
@npalm npalm closed this as completed Jul 8, 2021
radimsuckr pushed a commit to radimsuckr/terraform-aws-gitlab-runner that referenced this issue Jul 29, 2021
## [4.26.0](cattle-ops/terraform-aws-gitlab-runner@4.25.0...4.26.0) (2021-07-08)

### Features

* Add `role_tags` to support tag based authorization ([cattle-ops#333](cattle-ops#333)) ([cattle-ops#335](cattle-ops#335)) ([c81f221](cattle-ops@c81f221))
* Make disable_cache configurable ([cattle-ops#324](cattle-ops#324)) ([d726cf4](cattle-ops@d726cf4))
* replace default volume type gp2 by gp3  ([cattle-ops#338](cattle-ops#338)) ([1bfaf2b](cattle-ops@1bfaf2b)), closes [cattle-ops#318](cattle-ops#318)
* upgrade default runner version to 14.0.1 ([cattle-ops#341](cattle-ops#341)) ([18b4103](cattle-ops@18b4103))

### Bug Fixes

* add tags for instance profile ([cattle-ops#331](cattle-ops#331)) ([b42712f](cattle-ops@b42712f))
* Remove deprecarted null_data_source ([cattle-ops#332](cattle-ops#332)) ([cattle-ops#334](cattle-ops#334)) ([b3ab3f6](cattle-ops@b3ab3f6))
* replace deprecated null_data_source with locals ([cattle-ops#336](cattle-ops#336)) ([6a240c9](cattle-ops@6a240c9))
* support terraform 1.x ([800c264](cattle-ops@800c264)), closes [cattle-ops#330](cattle-ops#330)
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

No branches or pull requests

2 participants