Class SharedVPCHostProject
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
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
// A host project provides network resources to associated service projects.
var host = new Gcp.Compute.SharedVPCHostProject("host", new Gcp.Compute.SharedVPCHostProjectArgs
{
Project = "host-project-id",
});
// A service project gains access to network resources provided by its
// associated host project.
var service1 = new Gcp.Compute.SharedVPCServiceProject("service1", new Gcp.Compute.SharedVPCServiceProjectArgs
{
HostProject = host.Project,
ServiceProject = "service-project-id-1",
});
var service2 = new Gcp.Compute.SharedVPCServiceProject("service2", new Gcp.Compute.SharedVPCServiceProjectArgs
{
HostProject = host.Project,
ServiceProject = "service-project-id-2",
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Compute
Assembly: Pulumi.Gcp.dll
Syntax
public class SharedVPCHostProject : CustomResource
Constructors
View SourceSharedVPCHostProject(String, SharedVPCHostProjectArgs, CustomResourceOptions)
Create a SharedVPCHostProject resource with the given unique name, arguments, and options.
Declaration
public SharedVPCHostProject(string name, SharedVPCHostProjectArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| SharedVPCHostProjectArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceProject
The ID of the project that will serve as a Shared VPC host project
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, SharedVPCHostProjectState, CustomResourceOptions)
Get an existing SharedVPCHostProject resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static SharedVPCHostProject Get(string name, Input<string> id, SharedVPCHostProjectState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| SharedVPCHostProjectState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| SharedVPCHostProject |