Expand description
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
ⓘ
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let host = shared_vpc_host_project::create(
"host",
SharedVpcHostProjectArgs::builder().project("host-project-id").build_struct(),
);
let service1 = shared_vpc_service_project::create(
"service1",
SharedVpcServiceProjectArgs::builder()
.host_project("${host.project}")
.service_project("service-project-id-1")
.build_struct(),
);
let service2 = shared_vpc_service_project::create(
"service2",
SharedVpcServiceProjectArgs::builder()
.host_project("${host.project}")
.service_project("service-project-id-2")
.build_struct(),
);
}
§Import
Google Compute Engine Shared VPC host project feature can be imported using project
, e.g.
{{project_id}}
When using the pulumi import
command, Google Compute Engine Shared VPC host projects can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/sharedVPCHostProject:SharedVPCHostProject default {{project_id}}
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments