Skip to content

Commit

Permalink
feat: Add support for new organization policies (#863)
Browse files Browse the repository at this point in the history
* add support for Public Access Prevention organization policy

* add support for Restrict Authorized Networks on Cloud SQL instances organization policy

* add new org policies to the integration test validation
  • Loading branch information
daniel-cit committed Nov 3, 2022
1 parent 82aa221 commit 9c17c13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 1-org/envs/shared/org_policy.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ locals {
"compute.setNewProjectDefaultToZonalDNSOnly",
"compute.requireOsLogin",
"sql.restrictPublicIp",
"sql.restrictAuthorizedNetworks",
"iam.disableServiceAccountKeyCreation",
"iam.automaticIamGrantsForDefaultServiceAccounts",
"iam.disableServiceAccountKeyUpload",
"storage.uniformBucketLevelAccess"
"storage.uniformBucketLevelAccess",
"storage.publicAccessPrevention"
])
}

Expand Down
2 changes: 2 additions & 0 deletions test/integration/org/org_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ func TestOrg(t *testing.T) {
"constraints/compute.skipDefaultNetworkCreation",
"constraints/compute.restrictXpnProjectLienRemoval",
"constraints/sql.restrictPublicIp",
"constraints/sql.restrictAuthorizedNetworks",
"constraints/iam.disableServiceAccountKeyCreation",
"constraints/storage.uniformBucketLevelAccess",
"constraints/storage.publicAccessPrevention",
"constraints/iam.automaticIamGrantsForDefaultServiceAccounts",
} {
orgPolicy := gcloud.Runf(t, "resource-manager org-policies describe %s --folder %s", booleanConstraint, parentFolder)
Expand Down

0 comments on commit 9c17c13

Please sign in to comment.