2017-10-11 19:51:09 +00:00
|
|
|
---
|
|
|
|
layout: "google"
|
|
|
|
page_title: "Google: google_compute_shared_vpc_service_project"
|
|
|
|
sidebar_current: "docs-google-compute-shared-vpc-service-project"
|
|
|
|
description: |-
|
2017-11-13 20:48:18 +00:00
|
|
|
Enables the Google Compute Engine Shared VPC feature for a project, assigning it as a service project.
|
2017-10-11 19:51:09 +00:00
|
|
|
---
|
|
|
|
|
2017-11-13 20:48:18 +00:00
|
|
|
# google_compute_shared_vpc_service_project
|
2017-10-11 19:51:09 +00:00
|
|
|
|
2017-11-13 20:48:18 +00:00
|
|
|
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".
|
2017-10-11 19:51:09 +00:00
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
```hcl
|
2017-11-13 20:48:18 +00:00
|
|
|
resource "google_compute_shared_vpc_service_project" "service1" {
|
|
|
|
host_project = "host-project-id"
|
|
|
|
service_project = "service-project-id-1"
|
2017-10-11 19:51:09 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2017-11-13 20:48:18 +00:00
|
|
|
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).
|
|
|
|
|
2017-10-11 19:51:09 +00:00
|
|
|
## Argument Reference
|
|
|
|
|
2017-11-13 20:48:18 +00:00
|
|
|
The following arguments are expected:
|
|
|
|
|
|
|
|
* `host_project` - (Required) The ID of a host project to associate.
|
2017-10-11 19:51:09 +00:00
|
|
|
|
2017-11-13 20:48:18 +00:00
|
|
|
* `service_project` - (Required) The ID of the project that will serve as a Shared VPC service project.
|
2018-01-24 20:54:42 +00:00
|
|
|
|
|
|
|
## Import
|
|
|
|
|
|
|
|
Google Compute Engine Shared VPC service project feature can be imported using the `host_project` and `service_project`, e.g.
|
|
|
|
|
|
|
|
```
|
|
|
|
$ terraform import google_compute_shared_vpc_service_project.service1 host-project-id/service-project-id-1
|
|
|
|
```
|