Google Access Context Manager (VPC Service Controls) Access Level Condition

This page shows how to write Terraform for Access Context Manager (VPC Service Controls) Access Level Condition and write them securely.

google_access_context_manager_access_level_condition (Terraform)

The Access Level Condition in Access Context Manager (VPC Service Controls) can be configured in Terraform with the resource name google_access_context_manager_access_level_condition. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

  • access_level required - string
    • The name of the Access Level to add this condition to.

  • id optionalcomputed - string
  • ip_subnetworks optional - list / string
    • A list of CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed.

  • members optional - list / string
    • An allowed list of members (users, service accounts). Using groups is not supported yet. The signed-in user originating the request must be a part of one of the provided members. If not specified, a request may come from any user (logged in/not logged in, not present in any groups, etc.). Formats: 'user:{emailid}', 'serviceAccount:{emailid}'

  • negate optional - bool
    • Whether to negate the Condition. If true, the Condition becomes a NAND over its non-empty fields, each field must be false for the Condition overall to be satisfied. Defaults to false.

  • regions optional - list / string
    • The request must originate from one of the provided countries/regions. Format: A valid ISO 3166-1 alpha-2 code.

  • required_access_levels optional - list / string
    • A list of other access levels defined in the same Policy, referenced by resource name. Referencing an AccessLevel which does not exist is an error. All access levels listed must be granted for the Condition to be true. Format: accessPolicies/{policy_id}/accessLevels/{short_name}

Explanation in Terraform Registry

Allows configuring a single access level condition to be appended to an access level's conditions. This resource is intended to be used in cases where it is not possible to compile a full list of conditions to include in a google_access_context_manager_access_level resource, to enable them to be added separately.

Note: If this resource is used alongside a google_access_context_manager_access_level resource, the access level resource must have a lifecycle block with ignore_changes = [basic[0].conditions] so they don't fight over which service accounts should be included. To get more information about AccessLevelCondition, see:

  • API documentation
  • How-to Guides
    • Access Policy Quickstart

      Warning: If you are using User ADCs (Application Default Credentials) with this resource, you must specify a billing_project and set user_project_override to true in the provider configuration. Otherwise the ACM API will return a 403 error. Your account must have the serviceusage.services.use permission on the billing_project you defined.

Frequently asked questions

What is Google Access Context Manager (VPC Service Controls) Access Level Condition?

Google Access Context Manager (VPC Service Controls) Access Level Condition is a resource for Access Context Manager (VPC Service Controls) of Google Cloud Platform. Settings can be wrote in Terraform.

security-icon

Scan your IaC problem in 3 minutes for free

You can keep your IaC security for free. No credit card required.