SharedVPCServiceProject

class SharedVPCServiceProject : KotlinCustomResource

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".

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const service1 = new gcp.compute.SharedVPCServiceProject("service1", {
hostProject: "host-project-id",
serviceProject: "service-project-id-1",
});
import pulumi
import pulumi_gcp as gcp
service1 = gcp.compute.SharedVPCServiceProject("service1",
host_project="host-project-id",
service_project="service-project-id-1")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var service1 = new Gcp.Compute.SharedVPCServiceProject("service1", new()
{
HostProject = "host-project-id",
ServiceProject = "service-project-id-1",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewSharedVPCServiceProject(ctx, "service1", &compute.SharedVPCServiceProjectArgs{
HostProject: pulumi.String("host-project-id"),
ServiceProject: pulumi.String("service-project-id-1"),
})
if err != nil {
return err
}
return nil
})
}
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());
}
}
resources:
service1:
type: gcp:compute:SharedVPCServiceProject
properties:
hostProject: host-project-id
serviceProject: service-project-id-1

For a complete Shared VPC example with both host and service projects, see gcp.compute.SharedVPCHostProject.

Import

Google Compute Engine Shared VPC service project feature can be imported using the host_project and service_project, e.g.

  • {{host_project}/{{service_project}} When using the pulumi import command, Google Compute Engine Shared VPC service project can be imported using one of the formats above. For example:

$ pulumi import gcp:compute/sharedVPCServiceProject:SharedVPCServiceProject default {{host_project}/{{service_project}}

Properties

Link copied to clipboard
val deletionPolicy: Output<String>?

The deletion policy for the shared VPC service. Setting ABANDON allows the resource to be abandoned rather than deleted. Possible values are: "ABANDON".

Link copied to clipboard
val hostProject: Output<String>

The ID of a host project to associate.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val serviceProject: Output<String>

The ID of the project that will serve as a Shared VPC service project.

Link copied to clipboard
val urn: Output<String>