google_access_context_manager_access_policy

AccessPolicy is a container for AccessLevels (which define the necessary attributes to use GCP services) and ServicePerimeters (which define regions of services able to freely pass data within a perimeter). An access policy is globally visible within an organization, and the restrictions it specifies apply to all projects within an organization.

To get more information about AccessPolicy, see:

Example Usage - Access Context Manager Access Policy Basic

resource "google_access_context_manager_access_policy" "access-policy" {
  parent = "organizations/123456789"
  title  = "Org Access Policy"
}

Example Usage - Access Context Manager Access Policy Scoped

resource "google_project" "project" {
  project_id      = "my-project-name"
  name            = "my-project-name"
  org_id          = "123456789"
}

resource "google_access_context_manager_access_policy" "access-policy" {
  parent = "organizations/123456789"
  title  = "Scoped Access Policy"
  scopes = ["projects/${google_project.project.number}"]
}

Argument Reference

The following arguments are supported:


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

AccessPolicy can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import AccessPolicy using one of the formats above. For example:

import {
  id = "{{name}}"
  to = google_access_context_manager_access_policy.default
}

When using the terraform import command, AccessPolicy can be imported using one of the formats above. For example:

$ terraform import google_access_context_manager_access_policy.default {{name}}