Skip to content

Commit 371b2cf

Browse files
authored
Create a CI user, add to environmental admin group (#1222)
* Create a CI user, add to environmental admin group * Lint
1 parent 7aa7415 commit 371b2cf

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

pulumi/__main__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,20 @@
113113
**automaton_opts,
114114
)
115115

116+
117+
def __sap_on_apply(resources):
118+
ci_user_name = f'{project.name_prefix}-ci'
119+
tb_pulumi.iam.UserWithAccessKey(
120+
ci_user_name,
121+
project=project,
122+
user_name=ci_user_name,
123+
groups=[resources['admin_group']],
124+
opts=pulumi.ResourceOptions(depends_on=[sap]),
125+
)
126+
127+
116128
sap = tb_pulumi.iam.StackAccessPolicies(
117129
f'{project.name_prefix}-sap',
118130
project=project,
131+
on_apply=__sap_on_apply,
119132
)

pulumi/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
tb_pulumi @ git+https://github.com/thunderbird/pulumi.git@v0.0.15
1+
tb_pulumi @ git+https://github.com/thunderbird/pulumi.git@main
22
pulumi_cloudflare==6.3.1
3+

0 commit comments

Comments
 (0)