File tree Expand file tree Collapse file tree 9 files changed +67
-1
lines changed Expand file tree Collapse file tree 9 files changed +67
-1
lines changed Original file line number Diff line number Diff line change @@ -403,6 +403,16 @@ resource "aws_iam_policy" "cd" {
403403 })
404404}
405405
406+ module "ecr" {
407+ source = " github.com/silinternational/terraform-modules//aws/ecr?ref=8.13.2"
408+ repo_name = " ${ var . idp_name } /id-broker"
409+ ecsInstanceRole_arn = var. ecs_instance_role_arn
410+ ecsServiceRole_arn = var. ecsServiceRole_arn
411+ cd_user_arn = var. cd_principal_arn
412+ image_retention_count = 10
413+ image_retention_tags = [" latest" ]
414+ }
415+
406416/*
407417 * AWS data
408418 */
Original file line number Diff line number Diff line change @@ -27,6 +27,11 @@ variable "app_name" {
2727 default = " id-broker"
2828}
2929
30+ variable "cd_principal_arn" {
31+ description = " The ARN of the user or role that will push images to ECR for this service."
32+ type = string
33+ }
34+
3035variable "cduser_username" {
3136 type = string
3237 default = " IAM user name for the CD user. Used to create ECS deployment policy."
@@ -89,11 +94,17 @@ variable "docker_image" {
8994 type = string
9095}
9196
97+
9298variable "ecs_cluster_id" {
9399 description = " ID for ECS Cluster"
94100 type = string
95101}
96102
103+ variable "ecs_instance_role_arn" {
104+ description = " The ARN of the role that will be passed to ECS and ECR as the instance role."
105+ type = string
106+ }
107+
97108variable "ecsServiceRole_arn" {
98109 description = " ARN for ECS Service Role"
99110 type = string
Original file line number Diff line number Diff line change @@ -222,6 +222,16 @@ resource "aws_iam_policy" "cd" {
222222 })
223223}
224224
225+ module "ecr" {
226+ source = " github.com/silinternational/terraform-modules//aws/ecr?ref=8.13.2"
227+ repo_name = " ${ var . idp_name } /pw-api"
228+ ecsInstanceRole_arn = var. ecs_instance_role_arn
229+ ecsServiceRole_arn = var. ecsServiceRole_arn
230+ cd_user_arn = var. cd_principal_arn
231+ image_retention_count = 10
232+ image_retention_tags = [" latest" ]
233+ }
234+
225235/*
226236 * AWS data
227237 */
Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ variable "auth_saml_spPrivateKey" {
7474 type = string
7575}
7676
77+ variable "cd_principal_arn" {
78+ description = " The ARN of the user or role that will push images to ECR for this service."
79+ type = string
80+ }
81+
7782variable "cduser_username" {
7883 type = string
7984 default = " IAM user name for the CD user. Used to create ECS deployment policy."
@@ -128,6 +133,11 @@ variable "ecs_cluster_id" {
128133 type = string
129134}
130135
136+ variable "ecs_instance_role_arn" {
137+ description = " The ARN of the role that will be passed to ECS and ECR as the instance role."
138+ type = string
139+ }
140+
131141variable "ecsServiceRole_arn" {
132142 description = " ARN for ECS Service Role"
133143 type = string
Original file line number Diff line number Diff line change @@ -215,6 +215,16 @@ resource "aws_iam_policy" "cd" {
215215 })
216216}
217217
218+ module "ecr_simplesamlphp" {
219+ source = " github.com/silinternational/terraform-modules//aws/ecr?ref=8.13.2"
220+ repo_name = " ${ var . idp_name } /simplesamlphp"
221+ ecsInstanceRole_arn = var. ecs_instance_role_arn
222+ ecsServiceRole_arn = var. ecsServiceRole_arn
223+ cd_user_arn = var. cd_principal_arn
224+ image_retention_count = 10
225+ image_retention_tags = [" latest" ]
226+ }
227+
218228/*
219229 * AWS data
220230 */
Original file line number Diff line number Diff line change @@ -250,3 +250,13 @@ variable "ssl_ca_base64" {
250250 type = string
251251 default = " "
252252}
253+
254+ variable "cd_principal_arn" {
255+ description = " The ARN of the user or role that will push images to ECR for this service."
256+ type = string
257+ }
258+
259+ variable "ecs_instance_role_arn" {
260+ description = " The ARN of the role that will be passed to ECS and ECR as the instance role."
261+ type = string
262+ }
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ module "broker" {
66 abandoned_user_deactivate_instructions_url = " "
77 app_env = " "
88 app_name = " "
9+ cd_principal_arn = " "
910 cloudflare_domain = " "
1011 cloudwatch_log_group_name = " "
1112 contingent_user_duration = " "
@@ -16,6 +17,7 @@ module "broker" {
1617 docker_image = " "
1718 ecsServiceRole_arn = " "
1819 ecs_cluster_id = " "
20+ ecs_instance_role_arn = " "
1921 email_repeat_delay_days = 1
2022 email_signature = " "
2123 event_schedule = " "
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ module "pw" {
1313 auth_saml_signRequest = true
1414 auth_saml_spCertificate = " "
1515 auth_saml_spPrivateKey = " "
16+ cd_principal_arn = " "
1617 cloudflare_domain = " "
1718 cloudwatch_log_group_name = " "
1819 code_length = 1
@@ -23,6 +24,7 @@ module "pw" {
2324 docker_image = " "
2425 ecsServiceRole_arn = " "
2526 ecs_cluster_id = " "
27+ ecs_instance_role_arn = " "
2628 email_signature = " "
2729 extra_hosts = " "
2830 help_center_url = " "
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ module "ssp" {
88 analytics_id = " "
99 app_env = " "
1010 app_name = " "
11- cduser_username = " "
11+ cd_principal_arn = " "
1212 cloudflare_domain = " "
1313 cloudwatch_log_group_name = " "
1414 cpu = 1
@@ -18,6 +18,7 @@ module "ssp" {
1818 docker_image = " "
1919 ecsServiceRole_arn = " "
2020 ecs_cluster_id = " "
21+ ecs_instance_role_arn = " "
2122 enable_debug = true
2223 help_center_url = " "
2324 hub_mode = true
You can’t perform that action at this time.
0 commit comments