File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ Here's the gist of using it directly from github.
138138| bucket | Backup and Restore bucket. | ` string ` | n/a | yes |
139139| cluster\_ name | Cluster name. | ` string ` | n/a | yes |
140140| description | Namespace description | ` string ` | ` "velero-back-up-and-restore" ` | no |
141+ | iam\_ deploy | whther or not to deploy iam role | ` bool ` | ` true ` | no |
141142| name | namespace name | ` string ` | ` "velero" ` | no |
142143| namespace\_ deploy | whther or not to deploy namespace | ` bool ` | ` false ` | no |
143144| openid\_ connect\_ provider\_ uri | OpenID Connect Provider for EKS to enable IRSA. | ` string ` | n/a | yes |
@@ -157,10 +158,10 @@ Here's the gist of using it directly from github.
157158
158159<!-- START makefile-doc -->
159160```
160- $ make help
161+ $ make help
161162hooks Commit hooks setup
162163validate Validate with pre-commit hooks
163- changelog Update changelog
164+ changelog Update changelog
164165```
165166<!-- END makefile-doc -->
166167
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ data aws_iam_policy_document policy {
6262}
6363
6464resource aws_iam_role this {
65+ count = var. iam_deploy ? 1 : 0
6566 name = format (" %s-%s" , var. cluster_name , var. name )
6667 assume_role_policy = data. aws_iam_policy_document . assume_role . json
6768 tags = merge (var. tags ,
@@ -72,7 +73,8 @@ resource aws_iam_role this {
7273}
7374
7475resource aws_iam_role_policy this {
76+ count = var. iam_deploy ? 1 : 0
7577 name = format (" %s-%s" , var. cluster_name , var. name )
76- role = aws_iam_role. this . id
78+ role = element ( aws_iam_role. this . * . id , 0 )
7779 policy = data. aws_iam_policy_document . policy . json
7880}
Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ variable "app_deploy" {
1515 type = bool
1616}
1717
18+ variable "iam_deploy" {
19+ default = true
20+ description = " whther or not to deploy iam role"
21+ type = bool
22+ }
23+
1824variable "name" {
1925 default = " velero"
2026 description = " namespace name"
You can’t perform that action at this time.
0 commit comments