hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.28k stars 1.72k forks source link

Missing Ingress_from documentation for VPC Service Controls resources for using networks as incoming source #18142

Closed daanheikens closed 1 month ago

daanheikens commented 3 months ago

Community Note

Description

According to the API reference, the IngressSource object reflecting the ingress_from[].sources[] fields in the google_access_context_manager_service_perimeter should support networks as an option for the resource field. The documentation currently does not reflect this.

Source:https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressSource

New or Affected Resource(s)

Potential Terraform Configuration

resource "google_access_context_manager_service_perimeter_ingress_policy" "ingress_policy" {
  perimeter = "${google_access_context_manager_service_perimeter.storage-perimeter.name}"
  ingress_from {
    identity_type = "any_identity"
    sources {
      resource = "//compute.googleapis.com/projects/example-project/global/networks/example-network"
    }
  }
  ingress_to {
    resources = ["*"]
    operations {
      service_name = "bigquery.googleapis.com"
      method_selectors {
        method = "*"
      }
    }
  }
  lifecycle {
    create_before_destroy = true
  }
}

References

https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ingresssource https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/access_context_manager_service_perimeter_ingress_policy#resource

b/341749801

daanheikens commented 3 months ago

I can pick this one up, adding examples, docs and tests.

SarahFrench commented 1 month ago

Closed by https://github.com/GoogleCloudPlatform/magic-modules/pull/11273

github-actions[bot] commented 6 days ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.