Skip to content

Commit 2d50978

Browse files
authored
Merge branch 'master' into issue/2/iam_deploy
2 parents 0e7f825 + 1816d35 commit 2d50978

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ Here's the gist of using it directly from github.
139139
| cluster\_name | Cluster name. | `string` | n/a | yes |
140140
| description | Namespace description | `string` | `"velero-back-up-and-restore"` | no |
141141
| iam\_deploy | whther or not to deploy iam role | `bool` | `true` | no |
142+
| iam\_role\_name | Name of the Velero IAM role | `string` | `""` | no |
142143
| name | namespace name | `string` | `"velero"` | no |
143144
| namespace\_deploy | whther or not to deploy namespace | `bool` | `false` | no |
144145
| openid\_connect\_provider\_uri | OpenID Connect Provider for EKS to enable IRSA. | `string` | n/a | yes |

iam.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ data aws_iam_policy_document policy {
6363

6464
resource aws_iam_role this {
6565
count = var.iam_deploy ? 1 : 0
66-
name = format("%s-%s", var.cluster_name, var.name)
66+
name = var.iam_role_name == "" ? format("%s-%s", var.cluster_name, var.name) : var.iam_role_name
67+
6768
assume_role_policy = data.aws_iam_policy_document.assume_role.json
6869
tags = merge(var.tags,
6970
{ Attached = var.name },

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,9 @@ variable "bucket" {
6565
description = "Backup and Restore bucket."
6666
type = string
6767
}
68+
69+
variable "iam_role_name" {
70+
description = "Name of the Velero IAM role"
71+
type = string
72+
default = ""
73+
}

0 commit comments

Comments
 (0)