File tree Expand file tree Collapse file tree 3 files changed +38
-11
lines changed
Expand file tree Collapse file tree 3 files changed +38
-11
lines changed Original file line number Diff line number Diff line change 33import cloudfront
44import pulumi
55import tb_pulumi
6+ import tb_pulumi .ci
67import tb_pulumi .cloudwatch
78import tb_pulumi .ec2
89import tb_pulumi .iam
103104)
104105
105106
106- def __sap_on_apply (resources ):
107- ci_user_name = f'{ project .name_prefix } -ci'
108- tb_pulumi .iam .UserWithAccessKey (
109- ci_user_name ,
110- project = project ,
111- user_name = ci_user_name ,
112- groups = [resources ['admin_group' ]],
113- opts = pulumi .ResourceOptions (depends_on = [sap ]),
114- )
115-
107+ auto_users_opts = resources .get ('tb:ci:AwsAutomationUser' , {})
108+ for user , user_opts in auto_users_opts .items ():
109+ tb_pulumi .ci .AwsAutomationUser (f'{ project .name_prefix } -{ user } ' , project = project , ** user_opts )
116110
117111sap = tb_pulumi .iam .StackAccessPolicies (
118112 f'{ project .name_prefix } -sap' ,
119113 project = project ,
120- on_apply = __sap_on_apply ,
121114)
Original file line number Diff line number Diff line change @@ -236,3 +236,20 @@ resources:
236236 - thunderbird-services-monitoring@thunderbird.net
237237 config :
238238 alarms : {}
239+
240+ tb:ci:AwsAutomationUser :
241+ ci :
242+ additional_policies :
243+ - arn:aws:iam::768512802988:policy/appointment-prod-frontend-cache-invalidation
244+ enable_ecr_image_push : True
245+ ecr_repositories :
246+ - thunderbird/appointment
247+ enable_fargate_deployments : True
248+ fargate_clusters :
249+ - appointment-prod-fargate-backend
250+ fargate_task_role_arns :
251+ - arn:aws:iam::768512802988:role/appointment-prod-fargate-backend
252+ enable_full_s3_access : False
253+ enable_s3_bucket_upload : True
254+ s3_upload_buckets :
255+ - tb-appointment-prod-frontend
Original file line number Diff line number Diff line change @@ -246,3 +246,20 @@ resources:
246246 - thunderbird-services-monitoring@thunderbird.net
247247 config :
248248 alarms : {}
249+
250+ tb:ci:AwsAutomationUser :
251+ ci :
252+ additional_policies :
253+ - arn:aws:iam::768512802988:policy/appointment-stage-frontend-cache-invalidation
254+ enable_ecr_image_push : True
255+ ecr_repositories :
256+ - thunderbird/appointment
257+ enable_fargate_deployments : True
258+ fargate_clusters :
259+ - appointment-stage-fargate-backend
260+ fargate_task_role_arns :
261+ - arn:aws:iam::768512802988:role/appointment-stage-fargate-backend
262+ enable_full_s3_access : False
263+ enable_s3_bucket_upload : True
264+ s3_upload_buckets :
265+ - tb-appointment-stage-frontend
You can’t perform that action at this time.
0 commit comments