Skip to content

Commit 494194c

Browse files
committed
additional check for SCC API activation
1 parent 2fe88da commit 494194c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

helpers/foundation-deployer/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import (
3434

3535
var (
3636
validatorApis = []string{
37-
"securitycenter.googleapis.com",
3837
"accesscontextmanager.googleapis.com",
3938
}
4039
)
@@ -116,6 +115,9 @@ func main() {
116115
conf.ValidatorProject = *globalTFVars.ValidatorProjectId
117116
var apis []string
118117
gcpConf := gcp.NewGCP()
118+
if globalTFVars.EnableSccResourcesInTerraform != nil && *globalTFVars.EnableSccResourcesInTerraform {
119+
validatorApis = append(validatorApis, "securitycenter.googleapis.com")
120+
}
119121
for _, a := range validatorApis {
120122
if !gcpConf.IsApiEnabled(t, *globalTFVars.ValidatorProjectId, a) {
121123
apis = append(apis, a)

0 commit comments

Comments
 (0)