Skip to content

googleComputeSharedVpcHostProject

Enables the Google Compute Engine Shared VPC feature for a project, assigning it as a Shared VPC host project.

For more information, see, the Project API documentation, where the Shared VPC feature is referred to by its former name "XPN".

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleComputeSharedVpcHostProjectHost =
  new google.computeSharedVpcHostProject.ComputeSharedVpcHostProject(
    this,
    "host",
    {
      project: "host-project-id",
    }
  );
new google.computeSharedVpcServiceProject.ComputeSharedVpcServiceProject(
  this,
  "service1",
  {
    host_project: googleComputeSharedVpcHostProjectHost.project,
    service_project: "service-project-id-1",
  }
);
new google.computeSharedVpcServiceProject.ComputeSharedVpcServiceProject(
  this,
  "service2",
  {
    host_project: googleComputeSharedVpcHostProjectHost.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

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format {{project}}

Timeouts

This resource provides the following Timeouts configuration options: configuration options:

  • create - Default is 4 minutes.
  • delete - Default is 4 minutes.

Import

Google Compute Engine Shared VPC host project feature can be imported using the project, e.g.

$ terraform import google_compute_shared_vpc_host_project.host host-project-id