mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-06 18:51:13 +00:00
website: revised documentation for Compute Shared VPC resources (#725)
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.
This commit is contained in:
parent
68c6641dee
commit
182f87835b
@ -3,40 +3,42 @@ layout: "google"
|
|||||||
page_title: "Google: google_compute_shared_vpc_host_project"
|
page_title: "Google: google_compute_shared_vpc_host_project"
|
||||||
sidebar_current: "docs-google-compute-shared-vpc-host-project"
|
sidebar_current: "docs-google-compute-shared-vpc-host-project"
|
||||||
description: |-
|
description: |-
|
||||||
Allows enabling and disabling Shared VPC for the host Google Cloud Platform project.
|
Enables the Google Compute Engine Shared VPC feature for a project, assigning it as a host project.
|
||||||
---
|
---
|
||||||
|
|
||||||
# google\_compute\_shared\_vpc\_host\_project
|
# google_compute_shared_vpc_host_project
|
||||||
|
|
||||||
Allows enabling and disabling Shared VPC for the host Google Cloud Platform project. For more information see
|
Enables the Google Compute Engine
|
||||||
[the official documentation](https://cloud.google.com/compute/docs/shared-vpc)
|
[Shared VPC](https://cloud.google.com/compute/docs/shared-vpc)
|
||||||
and
|
feature for a project, assigning it as a Shared VPC host project.
|
||||||
[API](https://cloud.google.com/compute/docs/reference/latest/projects).
|
|
||||||
|
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
|
## Example Usage
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
|
# A host project provides network resources to associated service projects.
|
||||||
resource "google_compute_shared_vpc_host_project" "host" {
|
resource "google_compute_shared_vpc_host_project" "host" {
|
||||||
project = "your-host-project-id"
|
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" {
|
resource "google_compute_shared_vpc_service_project" "service1" {
|
||||||
project = "your-service-project-id-1"
|
host_project = "${google_compute_shared_vpc_host_project.host.project}"
|
||||||
// The host project must enable shared VPC first
|
service_project = "service-project-id-1"
|
||||||
depends_on = ["google_compute_shared_vpc_host_project.host"]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "google_compute_shared_vpc_service_project" "service2" {
|
resource "google_compute_shared_vpc_service_project" "service2" {
|
||||||
project = "your-service-project-id-2"
|
host_project = "${google_compute_shared_vpc_host_project.host.project}"
|
||||||
// The host project must enable shared VPC first
|
service_project = "service-project-id-2"
|
||||||
depends_on = ["google_compute_shared_vpc_host_project.host"]
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Argument Reference
|
## Argument Reference
|
||||||
|
|
||||||
The following arguments are supported:
|
The following arguments are expected:
|
||||||
|
|
||||||
* `host_project` - (Required) The host project ID.
|
* `project` - (Required) The ID of the project that will serve as a Shared VPC host project
|
||||||
|
|
||||||
* `service_project` - (Required) The service project ID.
|
|
||||||
|
@ -3,26 +3,36 @@ layout: "google"
|
|||||||
page_title: "Google: google_compute_shared_vpc_service_project"
|
page_title: "Google: google_compute_shared_vpc_service_project"
|
||||||
sidebar_current: "docs-google-compute-shared-vpc-service-project"
|
sidebar_current: "docs-google-compute-shared-vpc-service-project"
|
||||||
description: |-
|
description: |-
|
||||||
Allows enabling and disabling Shared VPC for a service Google Cloud Platform project.
|
Enables the Google Compute Engine Shared VPC feature for a project, assigning it as a service project.
|
||||||
---
|
---
|
||||||
|
|
||||||
# google\_compute\_shared\_vpc\_service\_project
|
# google_compute_shared_vpc_service_project
|
||||||
|
|
||||||
Allows enabling and disabling Shared VPC for a service Google Cloud Platform project. For more information see
|
Enables the Google Compute Engine
|
||||||
[the official documentation](https://cloud.google.com/compute/docs/shared-vpc)
|
[Shared VPC](https://cloud.google.com/compute/docs/shared-vpc)
|
||||||
and
|
feature for a project, assigning it as a Shared VPC service project associated
|
||||||
[API](https://cloud.google.com/compute/docs/reference/latest/projects).
|
with a given 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
|
## Example Usage
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
resource "google_compute_shared_vpc_host_project" "host" {
|
resource "google_compute_shared_vpc_service_project" "service1" {
|
||||||
project = "your-project-id"
|
host_project = "host-project-id"
|
||||||
|
service_project = "service-project-id-1"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For a complete Shared VPC example with both host and service projects, see
|
||||||
|
[`google_compute_shared_vpc_host_project`](/docs/providers/google/r/compute_shared_vpc_host_project.html).
|
||||||
|
|
||||||
## Argument Reference
|
## Argument Reference
|
||||||
|
|
||||||
The following arguments are supported:
|
The following arguments are expected:
|
||||||
|
|
||||||
* `project` - (Required) The host project ID.
|
* `host_project` - (Required) The ID of a host project to associate.
|
||||||
|
|
||||||
|
* `service_project` - (Required) The ID of the project that will serve as a Shared VPC service project.
|
||||||
|
Loading…
Reference in New Issue
Block a user