|
| 1 | +/* |
| 2 | +Copyright 2025 The Kubernetes Authors. |
| 3 | +
|
| 4 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +you may not use this file except in compliance with the License. |
| 6 | +You may obtain a copy of the License at |
| 7 | +
|
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +See the License for the specific language governing permissions and |
| 14 | +limitations under the License. |
| 15 | +*/ |
| 16 | + |
| 17 | +# We grant all the boskos permissions on the folder and they get inherited |
| 18 | +module "folder_iam" { |
| 19 | + source = "terraform-google-modules/iam/google//modules/folders_iam" |
| 20 | + version = "~> 8.1" |
| 21 | + folders = [google_folder.boskos.id] |
| 22 | + mode = "authoritative" |
| 23 | + |
| 24 | + bindings = { |
| 25 | + "organizations/758905017065/roles/prow.viewer" : [ |
| 26 | + "group:k8s-infra-prow-viewers@kubernetes.io" |
| 27 | + ] |
| 28 | + "roles/cloudkms.admin" = [ |
| 29 | + "serviceAccount:prow-build@k8s-infra-prow-build.iam.gserviceaccount.com" |
| 30 | + ] |
| 31 | + "roles/cloudkms.cryptoKeyEncrypterDecrypter" = [ |
| 32 | + "serviceAccount:prow-build@k8s-infra-prow-build.iam.gserviceaccount.com" |
| 33 | + ] |
| 34 | + "roles/editor" = [ |
| 35 | + "serviceAccount:boskos-janitor@k8s-infra-prow-build.iam.gserviceaccount.com", |
| 36 | + "serviceAccount:prow-build@k8s-infra-prow-build.iam.gserviceaccount.com" |
| 37 | + ] |
| 38 | + "roles/owner" = [ |
| 39 | + "group:k8s-infra-prow-oncall@kubernetes.io" |
| 40 | + ] |
| 41 | + "roles/iam.serviceAccountUser" = [ |
| 42 | + "serviceAccount:prow-build@k8s-infra-prow-build.iam.gserviceaccount.com" |
| 43 | + ] |
| 44 | + "roles/secretmanager.admin" = [ |
| 45 | + "serviceAccount:prow-build@k8s-infra-prow-build.iam.gserviceaccount.com" |
| 46 | + ] |
| 47 | + } |
| 48 | + |
| 49 | +} |
0 commit comments