mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-19 09:39:59 +00:00
182f87835b
The documentation pages for these two resources were previously a little muddled, with the argument references swapped and a non-working example for the host project.
45 lines
1.5 KiB
Markdown
45 lines
1.5 KiB
Markdown
---
|
|
layout: "google"
|
|
page_title: "Google: google_compute_shared_vpc_host_project"
|
|
sidebar_current: "docs-google-compute-shared-vpc-host-project"
|
|
description: |-
|
|
Enables the Google Compute Engine Shared VPC feature for a project, assigning it as a host project.
|
|
---
|
|
|
|
# google_compute_shared_vpc_host_project
|
|
|
|
Enables the Google Compute Engine
|
|
[Shared VPC](https://cloud.google.com/compute/docs/shared-vpc)
|
|
feature for a project, assigning it as a Shared VPC host project.
|
|
|
|
For more information, see,
|
|
[the Project API documentation](https://cloud.google.com/compute/docs/reference/latest/projects),
|
|
where the Shared VPC feature is referred to by its former name "XPN".
|
|
|
|
## Example Usage
|
|
|
|
```hcl
|
|
# A host project provides network resources to associated service projects.
|
|
resource "google_compute_shared_vpc_host_project" "host" {
|
|
project = "host-project-id"
|
|
}
|
|
|
|
# A service project gains access to network resources provided by its
|
|
# associated host project.
|
|
resource "google_compute_shared_vpc_service_project" "service1" {
|
|
host_project = "${google_compute_shared_vpc_host_project.host.project}"
|
|
service_project = "service-project-id-1"
|
|
}
|
|
resource "google_compute_shared_vpc_service_project" "service2" {
|
|
host_project = "${google_compute_shared_vpc_host_project.host.project}"
|
|
service_project = "service-project-id-2"
|
|
}
|
|
```
|
|
|
|
## Argument Reference
|
|
|
|
The following arguments are expected:
|
|
|
|
* `project` - (Required) The ID of the project that will serve as a Shared VPC host project
|
|
|