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

feat: Add role_name_prefix option for oidc roles #101

Merged
merged 3 commits into from
Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/iam-assumable-role-with-oidc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ This module supports IAM Roles for kubernetes service accounts as described in t
| provider\_url | URL of the OIDC Provider. Use provider\_urls to specify several URLs. | `string` | `""` | no |
| provider\_urls | List of URLs of the OIDC Providers | `list(string)` | `[]` | no |
| role\_description | IAM Role description | `string` | `""` | no |
| role\_name | IAM role name | `string` | `""` | no |
| role\_name | IAM role name | `string` | `null` | no |
| role\_name\_prefix | IAM role name prefix | `string` | `null` | no |
| role\_path | Path of IAM role | `string` | `"/"` | no |
| role\_permissions\_boundary\_arn | Permissions boundary ARN to use for IAM role | `string` | `""` | no |
| role\_policy\_arns | List of ARNs of IAM policies to attach to IAM role | `list(string)` | `[]` | no |
Expand Down
1 change: 1 addition & 0 deletions modules/iam-assumable-role-with-oidc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ resource "aws_iam_role" "this" {
count = var.create_role ? 1 : 0

name = var.role_name
name_prefix = var.role_name_prefix
description = var.role_description
path = var.role_path
max_session_duration = var.max_session_duration
Expand Down
8 changes: 7 additions & 1 deletion modules/iam-assumable-role-with-oidc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ variable "tags" {
variable "role_name" {
description = "IAM role name"
type = string
default = ""
default = null
}

variable "role_name_prefix" {
description = "IAM role name prefix"
type = string
default = null
}

variable "role_description" {
Expand Down