Skip to content

Commit

Permalink
fix: retrieve cluster developers string array as array (#409)
Browse files Browse the repository at this point in the history
* fix: retrieve cluster developers string array as array

* minor refactor
  • Loading branch information
braaar authored May 27, 2024
1 parent 7f89118 commit a10fcaf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion resources/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export const callerServiceAccount = googleConfig.require('service-account');

const k8sConfig = new pulumi.Config('kubernetes');

export const clusterDevelopers = k8sConfig.require('cluster-developers');
export const clusterDevelopers =
k8sConfig.requireObject<string[]>('cluster-developers');
19 changes: 11 additions & 8 deletions resources/google/iam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ export const callerClusterIamBinding = new gcp.projects.IAMBinding(
{ provider: mainClassicProvider },
);

new gcp.projects.IAMMember(
`cluster-developers-cluster-access`,
{
project: project.projectId,
role: 'roles/container.developer',
member: clusterDevelopers,
},
{ provider: mainClassicProvider },
clusterDevelopers.map(
member =>
new gcp.projects.IAMMember(
`cluster-developers-cluster-access`,
{
project: project.projectId,
role: 'roles/container.developer',
member,
},
{ provider: mainClassicProvider },
),
);

0 comments on commit a10fcaf

Please sign in to comment.