mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-06 09:06:44 +00:00
![Martin Atkins](/assets/img/avatar_default.png)
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.
39 lines
1.3 KiB
Markdown
39 lines
1.3 KiB
Markdown
---
|
|
layout: "google"
|
|
page_title: "Google: google_compute_shared_vpc_service_project"
|
|
sidebar_current: "docs-google-compute-shared-vpc-service-project"
|
|
description: |-
|
|
Enables the Google Compute Engine Shared VPC feature for a project, assigning it as a service project.
|
|
---
|
|
|
|
# google_compute_shared_vpc_service_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 service project associated
|
|
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
|
|
|
|
```hcl
|
|
resource "google_compute_shared_vpc_service_project" "service1" {
|
|
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
|
|
|
|
The following arguments are expected:
|
|
|
|
* `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.
|