Skip to content

Commit aad0e75

Browse files
committed
🧹 Add workflow to set org owner
Signed-off-by: Christian Zunker <christian@mondoo.com>
1 parent 7b6d5bc commit aad0e75

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/platform.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Set org owner
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch:
8+
9+
jobs:
10+
set-owner:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 15
13+
steps:
14+
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
15+
- env:
16+
MONDOO_API_TOKEN: ${{ secrets.MONDOO_TEST_ORG_TOKEN }}
17+
run: |
18+
terraform init
19+
terraform apply -auto-approve
20+
timeout-minutes: 10

terraform/main.tf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
terraform {
2+
required_providers {
3+
mondoo = {
4+
source = "mondoohq/mondoo"
5+
version = ">= 0.21"
6+
}
7+
}
8+
}
9+
10+
provider "mondoo" {}
11+
12+
resource "mondoo_iam_binding" "team_permissions" {
13+
identity_mrn = "//captain.api.mondoo.app/users/29ytZiLLwFcxDXCrwXRPcm3BYsV"
14+
resource_mrn = "//captain.api.mondoo.app/organizations/mondoo-operator-testing"
15+
roles = ["//iam.api.mondoo.app/roles/owner"]
16+
}

0 commit comments

Comments
 (0)