gcp.networkservices.Mesh
Explore with Pulumi AI
Example Usage
Network Services Mesh Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networkservices.Mesh("default", {
name: "my-mesh",
labels: {
foo: "bar",
},
description: "my description",
interceptionPort: 443,
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networkservices.Mesh("default",
name="my-mesh",
labels={
"foo": "bar",
},
description="my description",
interception_port=443)
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkservices.NewMesh(ctx, "default", &networkservices.MeshArgs{
Name: pulumi.String("my-mesh"),
Labels: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
Description: pulumi.String("my description"),
InterceptionPort: pulumi.Int(443),
})
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 @default = new Gcp.NetworkServices.Mesh("default", new()
{
Name = "my-mesh",
Labels =
{
{ "foo", "bar" },
},
Description = "my description",
InterceptionPort = 443,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkservices.Mesh;
import com.pulumi.gcp.networkservices.MeshArgs;
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 default_ = new Mesh("default", MeshArgs.builder()
.name("my-mesh")
.labels(Map.of("foo", "bar"))
.description("my description")
.interceptionPort(443)
.build());
}
}
resources:
default:
type: gcp:networkservices:Mesh
properties:
name: my-mesh
labels:
foo: bar
description: my description
interceptionPort: 443
Network Services Mesh No Port
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networkservices.Mesh("default", {
name: "my-mesh-noport",
labels: {
foo: "bar",
},
description: "my description",
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networkservices.Mesh("default",
name="my-mesh-noport",
labels={
"foo": "bar",
},
description="my description")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkservices.NewMesh(ctx, "default", &networkservices.MeshArgs{
Name: pulumi.String("my-mesh-noport"),
Labels: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
Description: pulumi.String("my description"),
})
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 @default = new Gcp.NetworkServices.Mesh("default", new()
{
Name = "my-mesh-noport",
Labels =
{
{ "foo", "bar" },
},
Description = "my description",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkservices.Mesh;
import com.pulumi.gcp.networkservices.MeshArgs;
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 default_ = new Mesh("default", MeshArgs.builder()
.name("my-mesh-noport")
.labels(Map.of("foo", "bar"))
.description("my description")
.build());
}
}
resources:
default:
type: gcp:networkservices:Mesh
properties:
name: my-mesh-noport
labels:
foo: bar
description: my description
Create Mesh Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Mesh(name: string, args?: MeshArgs, opts?: CustomResourceOptions);
@overload
def Mesh(resource_name: str,
args: Optional[MeshArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Mesh(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
interception_port: Optional[int] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
project: Optional[str] = None)
func NewMesh(ctx *Context, name string, args *MeshArgs, opts ...ResourceOption) (*Mesh, error)
public Mesh(string name, MeshArgs? args = null, CustomResourceOptions? opts = null)
type: gcp:networkservices:Mesh
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 MeshArgs
- 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 MeshArgs
- 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 MeshArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MeshArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MeshArgs
- 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 meshResource = new Gcp.NetworkServices.Mesh("meshResource", new()
{
Description = "string",
InterceptionPort = 0,
Labels =
{
{ "string", "string" },
},
Name = "string",
Project = "string",
});
example, err := networkservices.NewMesh(ctx, "meshResource", &networkservices.MeshArgs{
Description: pulumi.String("string"),
InterceptionPort: pulumi.Int(0),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Project: pulumi.String("string"),
})
var meshResource = new Mesh("meshResource", MeshArgs.builder()
.description("string")
.interceptionPort(0)
.labels(Map.of("string", "string"))
.name("string")
.project("string")
.build());
mesh_resource = gcp.networkservices.Mesh("meshResource",
description="string",
interception_port=0,
labels={
"string": "string",
},
name="string",
project="string")
const meshResource = new gcp.networkservices.Mesh("meshResource", {
description: "string",
interceptionPort: 0,
labels: {
string: "string",
},
name: "string",
project: "string",
});
type: gcp:networkservices:Mesh
properties:
description: string
interceptionPort: 0
labels:
string: string
name: string
project: string
Mesh Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Mesh resource accepts the following input properties:
- Description string
- A free-text description of the resource. Max length 1024 characters.
- Interception
Port int - Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This will is applicable only for sidecar proxy deployments.
- Labels Dictionary<string, string>
- Set of label tags associated with the Mesh resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - Name string
- Short name of the Mesh resource to be created.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Description string
- A free-text description of the resource. Max length 1024 characters.
- Interception
Port int - Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This will is applicable only for sidecar proxy deployments.
- Labels map[string]string
- Set of label tags associated with the Mesh resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - Name string
- Short name of the Mesh resource to be created.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- description String
- A free-text description of the resource. Max length 1024 characters.
- interception
Port Integer - Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This will is applicable only for sidecar proxy deployments.
- labels Map<String,String>
- Set of label tags associated with the Mesh resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - name String
- Short name of the Mesh resource to be created.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- description string
- A free-text description of the resource. Max length 1024 characters.
- interception
Port number - Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This will is applicable only for sidecar proxy deployments.
- labels {[key: string]: string}
- Set of label tags associated with the Mesh resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - name string
- Short name of the Mesh resource to be created.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- description str
- A free-text description of the resource. Max length 1024 characters.
- interception_
port int - Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This will is applicable only for sidecar proxy deployments.
- labels Mapping[str, str]
- Set of label tags associated with the Mesh resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - name str
- Short name of the Mesh resource to be created.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- description String
- A free-text description of the resource. Max length 1024 characters.
- interception
Port Number - Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This will is applicable only for sidecar proxy deployments.
- labels Map<String>
- Set of label tags associated with the Mesh resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - name String
- Short name of the Mesh resource to be created.
- 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 Mesh resource produces the following output properties:
- Create
Time string - Time the Mesh was created in UTC.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Self
Link string - Server-defined URL of this resource.
- Update
Time string - Time the Mesh was updated in UTC.
- Create
Time string - Time the Mesh was created in UTC.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Self
Link string - Server-defined URL of this resource.
- Update
Time string - Time the Mesh was updated in UTC.
- create
Time String - Time the Mesh was created in UTC.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link String - Server-defined URL of this resource.
- update
Time String - Time the Mesh was updated in UTC.
- create
Time string - Time the Mesh was created in UTC.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link string - Server-defined URL of this resource.
- update
Time string - Time the Mesh was updated in UTC.
- create_
time str - Time the Mesh was created in UTC.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- self_
link str - Server-defined URL of this resource.
- update_
time str - Time the Mesh was updated in UTC.
- create
Time String - Time the Mesh was created in UTC.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link String - Server-defined URL of this resource.
- update
Time String - Time the Mesh was updated in UTC.
Look up Existing Mesh Resource
Get an existing Mesh 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?: MeshState, opts?: CustomResourceOptions): Mesh
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
effective_labels: Optional[Mapping[str, str]] = None,
interception_port: Optional[int] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
self_link: Optional[str] = None,
update_time: Optional[str] = None) -> Mesh
func GetMesh(ctx *Context, name string, id IDInput, state *MeshState, opts ...ResourceOption) (*Mesh, error)
public static Mesh Get(string name, Input<string> id, MeshState? state, CustomResourceOptions? opts = null)
public static Mesh get(String name, Output<String> id, MeshState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Create
Time string - Time the Mesh was created in UTC.
- Description string
- A free-text description of the resource. Max length 1024 characters.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Interception
Port int - Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This will is applicable only for sidecar proxy deployments.
- Labels Dictionary<string, string>
- Set of label tags associated with the Mesh resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - Name string
- Short name of the Mesh resource to be created.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Self
Link string - Server-defined URL of this resource.
- Update
Time string - Time the Mesh was updated in UTC.
- Create
Time string - Time the Mesh was created in UTC.
- Description string
- A free-text description of the resource. Max length 1024 characters.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Interception
Port int - Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This will is applicable only for sidecar proxy deployments.
- Labels map[string]string
- Set of label tags associated with the Mesh resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - Name string
- Short name of the Mesh resource to be created.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Self
Link string - Server-defined URL of this resource.
- Update
Time string - Time the Mesh was updated in UTC.
- create
Time String - Time the Mesh was created in UTC.
- description String
- A free-text description of the resource. Max length 1024 characters.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- interception
Port Integer - Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This will is applicable only for sidecar proxy deployments.
- labels Map<String,String>
- Set of label tags associated with the Mesh resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - name String
- Short name of the Mesh resource to be created.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link String - Server-defined URL of this resource.
- update
Time String - Time the Mesh was updated in UTC.
- create
Time string - Time the Mesh was created in UTC.
- description string
- A free-text description of the resource. Max length 1024 characters.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- interception
Port number - Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This will is applicable only for sidecar proxy deployments.
- labels {[key: string]: string}
- Set of label tags associated with the Mesh resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - name string
- Short name of the Mesh resource to be created.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link string - Server-defined URL of this resource.
- update
Time string - Time the Mesh was updated in UTC.
- create_
time str - Time the Mesh was created in UTC.
- description str
- A free-text description of the resource. Max length 1024 characters.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- interception_
port int - Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This will is applicable only for sidecar proxy deployments.
- labels Mapping[str, str]
- Set of label tags associated with the Mesh resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - name str
- Short name of the Mesh resource to be created.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- self_
link str - Server-defined URL of this resource.
- update_
time str - Time the Mesh was updated in UTC.
- create
Time String - Time the Mesh was created in UTC.
- description String
- A free-text description of the resource. Max length 1024 characters.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- interception
Port Number - Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This will is applicable only for sidecar proxy deployments.
- labels Map<String>
- Set of label tags associated with the Mesh resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - name String
- Short name of the Mesh resource to be created.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link String - Server-defined URL of this resource.
- update
Time String - Time the Mesh was updated in UTC.
Import
Mesh can be imported using any of these accepted formats:
projects/{{project}}/locations/global/meshes/{{name}}
{{project}}/{{name}}
{{name}}
When using the pulumi import
command, Mesh can be imported using one of the formats above. For example:
$ pulumi import gcp:networkservices/mesh:Mesh default projects/{{project}}/locations/global/meshes/{{name}}
$ pulumi import gcp:networkservices/mesh:Mesh default {{project}}/{{name}}
$ pulumi import gcp:networkservices/mesh:Mesh 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.