gcp.compute.CrossSiteNetwork
Explore with Pulumi AI
Example Usage
Compute Cross Site Network Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const example_cross_site_network = new gcp.compute.CrossSiteNetwork("example-cross-site-network", {
name: "test-cross-site-network",
description: "Example cross site network",
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
example_cross_site_network = gcp.compute.CrossSiteNetwork("example-cross-site-network",
name="test-cross-site-network",
description="Example cross site network")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
_, err = compute.NewCrossSiteNetwork(ctx, "example-cross-site-network", &compute.CrossSiteNetworkArgs{
Name: pulumi.String("test-cross-site-network"),
Description: pulumi.String("Example cross site network"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var project = Gcp.Organizations.GetProject.Invoke();
var example_cross_site_network = new Gcp.Compute.CrossSiteNetwork("example-cross-site-network", new()
{
Name = "test-cross-site-network",
Description = "Example cross site network",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.compute.CrossSiteNetwork;
import com.pulumi.gcp.compute.CrossSiteNetworkArgs;
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) {
final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.build());
var example_cross_site_network = new CrossSiteNetwork("example-cross-site-network", CrossSiteNetworkArgs.builder()
.name("test-cross-site-network")
.description("Example cross site network")
.build());
}
}
resources:
example-cross-site-network:
type: gcp:compute:CrossSiteNetwork
properties:
name: test-cross-site-network
description: Example cross site network
variables:
project:
fn::invoke:
function: gcp:organizations:getProject
arguments: {}
Create CrossSiteNetwork Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CrossSiteNetwork(name: string, args?: CrossSiteNetworkArgs, opts?: CustomResourceOptions);
@overload
def CrossSiteNetwork(resource_name: str,
args: Optional[CrossSiteNetworkArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def CrossSiteNetwork(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None)
func NewCrossSiteNetwork(ctx *Context, name string, args *CrossSiteNetworkArgs, opts ...ResourceOption) (*CrossSiteNetwork, error)
public CrossSiteNetwork(string name, CrossSiteNetworkArgs? args = null, CustomResourceOptions? opts = null)
public CrossSiteNetwork(String name, CrossSiteNetworkArgs args)
public CrossSiteNetwork(String name, CrossSiteNetworkArgs args, CustomResourceOptions options)
type: gcp:compute:CrossSiteNetwork
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CrossSiteNetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CrossSiteNetworkArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CrossSiteNetworkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CrossSiteNetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CrossSiteNetworkArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var crossSiteNetworkResource = new Gcp.Compute.CrossSiteNetwork("crossSiteNetworkResource", new()
{
Description = "string",
Name = "string",
Project = "string",
});
example, err := compute.NewCrossSiteNetwork(ctx, "crossSiteNetworkResource", &compute.CrossSiteNetworkArgs{
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Project: pulumi.String("string"),
})
var crossSiteNetworkResource = new CrossSiteNetwork("crossSiteNetworkResource", CrossSiteNetworkArgs.builder()
.description("string")
.name("string")
.project("string")
.build());
cross_site_network_resource = gcp.compute.CrossSiteNetwork("crossSiteNetworkResource",
description="string",
name="string",
project="string")
const crossSiteNetworkResource = new gcp.compute.CrossSiteNetwork("crossSiteNetworkResource", {
description: "string",
name: "string",
project: "string",
});
type: gcp:compute:CrossSiteNetwork
properties:
description: string
name: string
project: string
CrossSiteNetwork Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CrossSiteNetwork resource accepts the following input properties:
- Description string
- An optional description of this resource.
- Name string
- Name of the resource. Provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Description string
- An optional description of this resource.
- Name string
- Name of the resource. Provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- description String
- An optional description of this resource.
- name String
- Name of the resource. Provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- description string
- An optional description of this resource.
- name string
- Name of the resource. Provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- description str
- An optional description of this resource.
- name str
- Name of the resource. Provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- description String
- An optional description of this resource.
- name String
- Name of the resource. Provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the CrossSiteNetwork resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing CrossSiteNetwork Resource
Get an existing CrossSiteNetwork resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CrossSiteNetworkState, opts?: CustomResourceOptions): CrossSiteNetwork
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None) -> CrossSiteNetwork
func GetCrossSiteNetwork(ctx *Context, name string, id IDInput, state *CrossSiteNetworkState, opts ...ResourceOption) (*CrossSiteNetwork, error)
public static CrossSiteNetwork Get(string name, Input<string> id, CrossSiteNetworkState? state, CustomResourceOptions? opts = null)
public static CrossSiteNetwork get(String name, Output<String> id, CrossSiteNetworkState state, CustomResourceOptions options)
resources: _: type: gcp:compute:CrossSiteNetwork get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Description string
- An optional description of this resource.
- Name string
- Name of the resource. Provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Description string
- An optional description of this resource.
- Name string
- Name of the resource. Provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- description String
- An optional description of this resource.
- name String
- Name of the resource. Provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- description string
- An optional description of this resource.
- name string
- Name of the resource. Provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- description str
- An optional description of this resource.
- name str
- Name of the resource. Provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- description String
- An optional description of this resource.
- name String
- Name of the resource. Provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Import
CrossSiteNetwork can be imported using any of these accepted formats:
projects/{{project}}/global/crossSiteNetworks/{{name}}
{{project}}/{{name}}
{{name}}
When using the pulumi import
command, CrossSiteNetwork can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/crossSiteNetwork:CrossSiteNetwork default projects/{{project}}/global/crossSiteNetworks/{{name}}
$ pulumi import gcp:compute/crossSiteNetwork:CrossSiteNetwork default {{project}}/{{name}}
$ pulumi import gcp:compute/crossSiteNetwork:CrossSiteNetwork default {{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.