We have a constraint policy set for cloudrun (constraints/run.allowedBinaryAuthorizationPolicies) and need to set cloudrun binary authorization policy to default. Cloudfunctions v2 uses cloudrun under the covers but the terraform doesn’t seem to have a binaryauthorization section in its terraform arguments.
Note that the CLI for cloudfunctions has this.
This results in an error in our env like this:
│ Error: Error creating function: googleapi: Error 400: Could not create Cloud Run service xxxxxx. Constraint constraints/run.allowedBinaryAuthorizationPolicies violated for attempting CreateService with annotation “run.googleapis.com/binary-authorization” set to null. See 组织政策限制条件 | Resource Manager Documentation | Google Cloud for more information.
Is there a way to set this via terraform or is it missing?