Shared VPCService Project
Enables the Google Compute Engine 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, where the Shared VPC feature is referred to by its former name "XPN".
Note: If Shared VPC Admin role is set at the folder level, use the google-beta provider. The google provider only supports this permission at project or organizational level currently. 0
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.SharedVPCServiceProject;
import com.pulumi.gcp.compute.SharedVPCServiceProjectArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var service1 = new SharedVPCServiceProject("service1", SharedVPCServiceProjectArgs.builder()
.hostProject("host-project-id")
.serviceProject("service-project-id-1")
.build());
}
}
Import
Google Compute Engine Shared VPC service project feature can be imported using the host_project
and service_project
, e.g.
$ pulumi import gcp:compute/sharedVPCServiceProject:SharedVPCServiceProject service1 host-project-id/service-project-id-1
Properties
The deletion policy for the shared VPC service. Setting ABANDON allows the resource to be abandoned rather than deleted. Possible values are: "ABANDON".
The ID of a host project to associate.
The ID of the project that will serve as a Shared VPC service project.