File tree 3 files changed +13
-7
lines changed
3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ module "cloud-key-rotator" {
44
44
* (Optional) ` config_data = <string> ` -> Pass a json blob from any source containing your config file.
45
45
* (Optional) ` enable_ssm_location = false ` -> Whether to create an IAM policy allowing ` ssm:PutParameter ` .
46
46
Set this to ` true ` if using SSM as a ` cloud-key-rotator ` location.
47
+ * (Optional) ` region = <string> ` -> pass aws region. Defaults to ` eu-west-1 ` if not set.
47
48
48
49
## Usage - GCP
49
50
95
96
service account and scheduler job names to prevent naming conflicts
96
97
* (Optional) ` ckr_schedule = "0 10 * * 1-5" ` -> Defaults to triggering 10am Monday-Friday.
97
98
* (Optional) ` ckr_schedule_time_zone = "Europe/London" ` -> The time zone for the scheduler job. Defaults to Europe/London
98
- * (Optional)
` deploying_accounts = ["serviceAccount:[email protected] "] ` -> Any accounts which
99
- will be deploying the CKR terraform but do not have the iam.serviceAccountUser permission for the whole project. This
100
- gives the supplied accounts iam.serviceAccountUser permissions for the Cloud Key Rotator service account which is
99
+ * (Optional)
` deploying_accounts = ["serviceAccount:[email protected] "] ` -> Any accounts which
100
+ will be deploying the CKR terraform but do not have the iam.serviceAccountUser permission for the whole project. This
101
+ gives the supplied accounts iam.serviceAccountUser permissions for the Cloud Key Rotator service account which is
101
102
necessary to deploy the terraform module. Defaults to an empty list
Original file line number Diff line number Diff line change @@ -119,14 +119,14 @@ resource "aws_iam_policy" "ckr_log_policy" {
119
119
"logs:PutLogEvents"
120
120
],
121
121
"Resource": [
122
- "arn:aws:logs:eu-west-1 :${ local . account_id } :log-stream:*:*:*",
123
- "arn:aws:logs:eu-west-1 :${ local . account_id } :log-group:/aws/lambda/cloud-key-*"
122
+ "arn:aws:logs:${ var . region } :${ local . account_id } :log-stream:*:*:*",
123
+ "arn:aws:logs:${ var . region } :${ local . account_id } :log-group:/aws/lambda/cloud-key-*"
124
124
]
125
125
},
126
126
{
127
127
"Effect": "Allow",
128
128
"Action": "logs:CreateLogGroup",
129
- "Resource": "arn:aws:logs:eu-west-1 :${ local . account_id } :*"
129
+ "Resource": "arn:aws:logs:${ var . region } :${ local . account_id } :*"
130
130
}
131
131
]
132
132
}
@@ -150,7 +150,7 @@ resource "aws_iam_policy" "ckr_ssm_policy" {
150
150
"ssm:PutParameter"
151
151
],
152
152
"Resource": [
153
- "arn:aws:ssm:eu-west-1 :${ local . account_id } :parameter/*"
153
+ "arn:aws:ssm:${ var . region } :${ local . account_id } :parameter/*"
154
154
]
155
155
}
156
156
]
Original file line number Diff line number Diff line change @@ -17,3 +17,8 @@ variable "enable_ssm_location" {
17
17
variable "ckr_trigger_description" {
18
18
default = " Scheduled cloud key rotation"
19
19
}
20
+
21
+ variable "region" {
22
+ type = string
23
+ default = " eu-west-1"
24
+ }
You can’t perform that action at this time.
0 commit comments