1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ServiceMesh
  5. VirtualService
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.ServiceMesh.VirtualService

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

    This resource provides the Virtual Service resource in Oracle Cloud Infrastructure Service Mesh service.

    Creates a new VirtualService.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testVirtualService = new oci.servicemesh.VirtualService("testVirtualService", {
        compartmentId: _var.compartment_id,
        meshId: oci_service_mesh_mesh.test_mesh.id,
        defaultRoutingPolicy: {
            type: _var.virtual_service_default_routing_policy_type,
        },
        definedTags: {
            "foo-namespace.bar-key": "value",
        },
        description: _var.virtual_service_description,
        freeformTags: {
            "bar-key": "value",
        },
        hosts: _var.virtual_service_hosts,
        mtls: {
            mode: _var.virtual_service_mtls_mode,
            maximumValidity: _var.virtual_service_mtls_maximum_validity,
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_virtual_service = oci.service_mesh.VirtualService("testVirtualService",
        compartment_id=var["compartment_id"],
        mesh_id=oci_service_mesh_mesh["test_mesh"]["id"],
        default_routing_policy=oci.service_mesh.VirtualServiceDefaultRoutingPolicyArgs(
            type=var["virtual_service_default_routing_policy_type"],
        ),
        defined_tags={
            "foo-namespace.bar-key": "value",
        },
        description=var["virtual_service_description"],
        freeform_tags={
            "bar-key": "value",
        },
        hosts=var["virtual_service_hosts"],
        mtls=oci.service_mesh.VirtualServiceMtlsArgs(
            mode=var["virtual_service_mtls_mode"],
            maximum_validity=var["virtual_service_mtls_maximum_validity"],
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/ServiceMesh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ServiceMesh.NewVirtualService(ctx, "testVirtualService", &ServiceMesh.VirtualServiceArgs{
    			CompartmentId: pulumi.Any(_var.Compartment_id),
    			MeshId:        pulumi.Any(oci_service_mesh_mesh.Test_mesh.Id),
    			DefaultRoutingPolicy: &servicemesh.VirtualServiceDefaultRoutingPolicyArgs{
    				Type: pulumi.Any(_var.Virtual_service_default_routing_policy_type),
    			},
    			DefinedTags: pulumi.Map{
    				"foo-namespace.bar-key": pulumi.Any("value"),
    			},
    			Description: pulumi.Any(_var.Virtual_service_description),
    			FreeformTags: pulumi.Map{
    				"bar-key": pulumi.Any("value"),
    			},
    			Hosts: pulumi.Any(_var.Virtual_service_hosts),
    			Mtls: &servicemesh.VirtualServiceMtlsArgs{
    				Mode:            pulumi.Any(_var.Virtual_service_mtls_mode),
    				MaximumValidity: pulumi.Any(_var.Virtual_service_mtls_maximum_validity),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testVirtualService = new Oci.ServiceMesh.VirtualService("testVirtualService", new()
        {
            CompartmentId = @var.Compartment_id,
            MeshId = oci_service_mesh_mesh.Test_mesh.Id,
            DefaultRoutingPolicy = new Oci.ServiceMesh.Inputs.VirtualServiceDefaultRoutingPolicyArgs
            {
                Type = @var.Virtual_service_default_routing_policy_type,
            },
            DefinedTags = 
            {
                { "foo-namespace.bar-key", "value" },
            },
            Description = @var.Virtual_service_description,
            FreeformTags = 
            {
                { "bar-key", "value" },
            },
            Hosts = @var.Virtual_service_hosts,
            Mtls = new Oci.ServiceMesh.Inputs.VirtualServiceMtlsArgs
            {
                Mode = @var.Virtual_service_mtls_mode,
                MaximumValidity = @var.Virtual_service_mtls_maximum_validity,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.ServiceMesh.VirtualService;
    import com.pulumi.oci.ServiceMesh.VirtualServiceArgs;
    import com.pulumi.oci.ServiceMesh.inputs.VirtualServiceDefaultRoutingPolicyArgs;
    import com.pulumi.oci.ServiceMesh.inputs.VirtualServiceMtlsArgs;
    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 testVirtualService = new VirtualService("testVirtualService", VirtualServiceArgs.builder()        
                .compartmentId(var_.compartment_id())
                .meshId(oci_service_mesh_mesh.test_mesh().id())
                .defaultRoutingPolicy(VirtualServiceDefaultRoutingPolicyArgs.builder()
                    .type(var_.virtual_service_default_routing_policy_type())
                    .build())
                .definedTags(Map.of("foo-namespace.bar-key", "value"))
                .description(var_.virtual_service_description())
                .freeformTags(Map.of("bar-key", "value"))
                .hosts(var_.virtual_service_hosts())
                .mtls(VirtualServiceMtlsArgs.builder()
                    .mode(var_.virtual_service_mtls_mode())
                    .maximumValidity(var_.virtual_service_mtls_maximum_validity())
                    .build())
                .build());
    
        }
    }
    
    resources:
      testVirtualService:
        type: oci:ServiceMesh:VirtualService
        properties:
          #Required
          compartmentId: ${var.compartment_id}
          meshId: ${oci_service_mesh_mesh.test_mesh.id}
          defaultRoutingPolicy:
            type: ${var.virtual_service_default_routing_policy_type}
          definedTags:
            foo-namespace.bar-key: value
          description: ${var.virtual_service_description}
          freeformTags:
            bar-key: value
          hosts: ${var.virtual_service_hosts}
          mtls:
            mode: ${var.virtual_service_mtls_mode}
            maximumValidity: ${var.virtual_service_mtls_maximum_validity}
    

    Create VirtualService Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VirtualService(name: string, args: VirtualServiceArgs, opts?: CustomResourceOptions);
    @overload
    def VirtualService(resource_name: str,
                       args: VirtualServiceArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def VirtualService(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       compartment_id: Optional[str] = None,
                       mesh_id: Optional[str] = None,
                       default_routing_policy: Optional[_servicemesh.VirtualServiceDefaultRoutingPolicyArgs] = None,
                       defined_tags: Optional[Mapping[str, Any]] = None,
                       description: Optional[str] = None,
                       freeform_tags: Optional[Mapping[str, Any]] = None,
                       hosts: Optional[Sequence[str]] = None,
                       mtls: Optional[_servicemesh.VirtualServiceMtlsArgs] = None,
                       name: Optional[str] = None)
    func NewVirtualService(ctx *Context, name string, args VirtualServiceArgs, opts ...ResourceOption) (*VirtualService, error)
    public VirtualService(string name, VirtualServiceArgs args, CustomResourceOptions? opts = null)
    public VirtualService(String name, VirtualServiceArgs args)
    public VirtualService(String name, VirtualServiceArgs args, CustomResourceOptions options)
    
    type: oci:ServiceMesh:VirtualService
    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 VirtualServiceArgs
    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 VirtualServiceArgs
    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 VirtualServiceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VirtualServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VirtualServiceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var virtualServiceResource = new Oci.ServiceMesh.VirtualService("virtualServiceResource", new()
    {
        CompartmentId = "string",
        MeshId = "string",
        DefaultRoutingPolicy = new Oci.ServiceMesh.Inputs.VirtualServiceDefaultRoutingPolicyArgs
        {
            Type = "string",
        },
        DefinedTags = 
        {
            { "string", "any" },
        },
        Description = "string",
        FreeformTags = 
        {
            { "string", "any" },
        },
        Hosts = new[]
        {
            "string",
        },
        Mtls = new Oci.ServiceMesh.Inputs.VirtualServiceMtlsArgs
        {
            Mode = "string",
            CertificateId = "string",
            MaximumValidity = 0,
        },
        Name = "string",
    });
    
    example, err := ServiceMesh.NewVirtualService(ctx, "virtualServiceResource", &ServiceMesh.VirtualServiceArgs{
    	CompartmentId: pulumi.String("string"),
    	MeshId:        pulumi.String("string"),
    	DefaultRoutingPolicy: &servicemesh.VirtualServiceDefaultRoutingPolicyArgs{
    		Type: pulumi.String("string"),
    	},
    	DefinedTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Description: pulumi.String("string"),
    	FreeformTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Hosts: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Mtls: &servicemesh.VirtualServiceMtlsArgs{
    		Mode:            pulumi.String("string"),
    		CertificateId:   pulumi.String("string"),
    		MaximumValidity: pulumi.Int(0),
    	},
    	Name: pulumi.String("string"),
    })
    
    var virtualServiceResource = new VirtualService("virtualServiceResource", VirtualServiceArgs.builder()        
        .compartmentId("string")
        .meshId("string")
        .defaultRoutingPolicy(VirtualServiceDefaultRoutingPolicyArgs.builder()
            .type("string")
            .build())
        .definedTags(Map.of("string", "any"))
        .description("string")
        .freeformTags(Map.of("string", "any"))
        .hosts("string")
        .mtls(VirtualServiceMtlsArgs.builder()
            .mode("string")
            .certificateId("string")
            .maximumValidity(0)
            .build())
        .name("string")
        .build());
    
    virtual_service_resource = oci.service_mesh.VirtualService("virtualServiceResource",
        compartment_id="string",
        mesh_id="string",
        default_routing_policy=oci.service_mesh.VirtualServiceDefaultRoutingPolicyArgs(
            type="string",
        ),
        defined_tags={
            "string": "any",
        },
        description="string",
        freeform_tags={
            "string": "any",
        },
        hosts=["string"],
        mtls=oci.service_mesh.VirtualServiceMtlsArgs(
            mode="string",
            certificate_id="string",
            maximum_validity=0,
        ),
        name="string")
    
    const virtualServiceResource = new oci.servicemesh.VirtualService("virtualServiceResource", {
        compartmentId: "string",
        meshId: "string",
        defaultRoutingPolicy: {
            type: "string",
        },
        definedTags: {
            string: "any",
        },
        description: "string",
        freeformTags: {
            string: "any",
        },
        hosts: ["string"],
        mtls: {
            mode: "string",
            certificateId: "string",
            maximumValidity: 0,
        },
        name: "string",
    });
    
    type: oci:ServiceMesh:VirtualService
    properties:
        compartmentId: string
        defaultRoutingPolicy:
            type: string
        definedTags:
            string: any
        description: string
        freeformTags:
            string: any
        hosts:
            - string
        meshId: string
        mtls:
            certificateId: string
            maximumValidity: 0
            mode: string
        name: string
    

    VirtualService 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 VirtualService resource accepts the following input properties:

    CompartmentId string
    (Updatable) The OCID of the compartment.
    MeshId string
    The OCID of the service mesh in which this virtual service is created.
    DefaultRoutingPolicy VirtualServiceDefaultRoutingPolicy
    (Updatable) Routing policy for the virtual service.
    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
    FreeformTags Dictionary<string, object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Hosts List<string>
    (Updatable) The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    Mtls VirtualServiceMtls
    (Updatable) The mTLS authentication mode to use when receiving requests from other virtual services or ingress gateways within the mesh.
    Name string

    A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example: My unique resource name

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    CompartmentId string
    (Updatable) The OCID of the compartment.
    MeshId string
    The OCID of the service mesh in which this virtual service is created.
    DefaultRoutingPolicy VirtualServiceDefaultRoutingPolicyArgs
    (Updatable) Routing policy for the virtual service.
    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
    FreeformTags map[string]interface{}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Hosts []string
    (Updatable) The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    Mtls VirtualServiceMtlsArgs
    (Updatable) The mTLS authentication mode to use when receiving requests from other virtual services or ingress gateways within the mesh.
    Name string

    A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example: My unique resource name

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    compartmentId String
    (Updatable) The OCID of the compartment.
    meshId String
    The OCID of the service mesh in which this virtual service is created.
    defaultRoutingPolicy VirtualServiceDefaultRoutingPolicy
    (Updatable) Routing policy for the virtual service.
    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
    freeformTags Map<String,Object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    hosts List<String>
    (Updatable) The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    mtls VirtualServiceMtls
    (Updatable) The mTLS authentication mode to use when receiving requests from other virtual services or ingress gateways within the mesh.
    name String

    A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example: My unique resource name

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    compartmentId string
    (Updatable) The OCID of the compartment.
    meshId string
    The OCID of the service mesh in which this virtual service is created.
    defaultRoutingPolicy VirtualServiceDefaultRoutingPolicy
    (Updatable) Routing policy for the virtual service.
    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    (Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
    freeformTags {[key: string]: any}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    hosts string[]
    (Updatable) The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    mtls VirtualServiceMtls
    (Updatable) The mTLS authentication mode to use when receiving requests from other virtual services or ingress gateways within the mesh.
    name string

    A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example: My unique resource name

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    compartment_id str
    (Updatable) The OCID of the compartment.
    mesh_id str
    The OCID of the service mesh in which this virtual service is created.
    default_routing_policy servicemesh.VirtualServiceDefaultRoutingPolicyArgs
    (Updatable) Routing policy for the virtual service.
    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description str
    (Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
    freeform_tags Mapping[str, Any]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    hosts Sequence[str]
    (Updatable) The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    mtls servicemesh.VirtualServiceMtlsArgs
    (Updatable) The mTLS authentication mode to use when receiving requests from other virtual services or ingress gateways within the mesh.
    name str

    A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example: My unique resource name

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    compartmentId String
    (Updatable) The OCID of the compartment.
    meshId String
    The OCID of the service mesh in which this virtual service is created.
    defaultRoutingPolicy Property Map
    (Updatable) Routing policy for the virtual service.
    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
    freeformTags Map<Any>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    hosts List<String>
    (Updatable) The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    mtls Property Map
    (Updatable) The mTLS authentication mode to use when receiving requests from other virtual services or ingress gateways within the mesh.
    name String

    A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example: My unique resource name

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VirtualService resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    LifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
    State string
    The current state of the Resource.
    SystemTags Dictionary<string, object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The time when this resource was created in an RFC3339 formatted datetime string.
    TimeUpdated string
    The time when this resource was updated in an RFC3339 formatted datetime string.
    Id string
    The provider-assigned unique ID for this managed resource.
    LifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
    State string
    The current state of the Resource.
    SystemTags map[string]interface{}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The time when this resource was created in an RFC3339 formatted datetime string.
    TimeUpdated string
    The time when this resource was updated in an RFC3339 formatted datetime string.
    id String
    The provider-assigned unique ID for this managed resource.
    lifecycleDetails String
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
    state String
    The current state of the Resource.
    systemTags Map<String,Object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The time when this resource was created in an RFC3339 formatted datetime string.
    timeUpdated String
    The time when this resource was updated in an RFC3339 formatted datetime string.
    id string
    The provider-assigned unique ID for this managed resource.
    lifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
    state string
    The current state of the Resource.
    systemTags {[key: string]: any}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    The time when this resource was created in an RFC3339 formatted datetime string.
    timeUpdated string
    The time when this resource was updated in an RFC3339 formatted datetime string.
    id str
    The provider-assigned unique ID for this managed resource.
    lifecycle_details str
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
    state str
    The current state of the Resource.
    system_tags Mapping[str, Any]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created str
    The time when this resource was created in an RFC3339 formatted datetime string.
    time_updated str
    The time when this resource was updated in an RFC3339 formatted datetime string.
    id String
    The provider-assigned unique ID for this managed resource.
    lifecycleDetails String
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
    state String
    The current state of the Resource.
    systemTags Map<Any>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The time when this resource was created in an RFC3339 formatted datetime string.
    timeUpdated String
    The time when this resource was updated in an RFC3339 formatted datetime string.

    Look up Existing VirtualService Resource

    Get an existing VirtualService 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?: VirtualServiceState, opts?: CustomResourceOptions): VirtualService
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compartment_id: Optional[str] = None,
            default_routing_policy: Optional[_servicemesh.VirtualServiceDefaultRoutingPolicyArgs] = None,
            defined_tags: Optional[Mapping[str, Any]] = None,
            description: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, Any]] = None,
            hosts: Optional[Sequence[str]] = None,
            lifecycle_details: Optional[str] = None,
            mesh_id: Optional[str] = None,
            mtls: Optional[_servicemesh.VirtualServiceMtlsArgs] = None,
            name: Optional[str] = None,
            state: Optional[str] = None,
            system_tags: Optional[Mapping[str, Any]] = None,
            time_created: Optional[str] = None,
            time_updated: Optional[str] = None) -> VirtualService
    func GetVirtualService(ctx *Context, name string, id IDInput, state *VirtualServiceState, opts ...ResourceOption) (*VirtualService, error)
    public static VirtualService Get(string name, Input<string> id, VirtualServiceState? state, CustomResourceOptions? opts = null)
    public static VirtualService get(String name, Output<String> id, VirtualServiceState 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.
    The following state arguments are supported:
    CompartmentId string
    (Updatable) The OCID of the compartment.
    DefaultRoutingPolicy VirtualServiceDefaultRoutingPolicy
    (Updatable) Routing policy for the virtual service.
    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
    FreeformTags Dictionary<string, object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Hosts List<string>
    (Updatable) The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    LifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
    MeshId string
    The OCID of the service mesh in which this virtual service is created.
    Mtls VirtualServiceMtls
    (Updatable) The mTLS authentication mode to use when receiving requests from other virtual services or ingress gateways within the mesh.
    Name string

    A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example: My unique resource name

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    State string
    The current state of the Resource.
    SystemTags Dictionary<string, object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The time when this resource was created in an RFC3339 formatted datetime string.
    TimeUpdated string
    The time when this resource was updated in an RFC3339 formatted datetime string.
    CompartmentId string
    (Updatable) The OCID of the compartment.
    DefaultRoutingPolicy VirtualServiceDefaultRoutingPolicyArgs
    (Updatable) Routing policy for the virtual service.
    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
    FreeformTags map[string]interface{}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Hosts []string
    (Updatable) The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    LifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
    MeshId string
    The OCID of the service mesh in which this virtual service is created.
    Mtls VirtualServiceMtlsArgs
    (Updatable) The mTLS authentication mode to use when receiving requests from other virtual services or ingress gateways within the mesh.
    Name string

    A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example: My unique resource name

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    State string
    The current state of the Resource.
    SystemTags map[string]interface{}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The time when this resource was created in an RFC3339 formatted datetime string.
    TimeUpdated string
    The time when this resource was updated in an RFC3339 formatted datetime string.
    compartmentId String
    (Updatable) The OCID of the compartment.
    defaultRoutingPolicy VirtualServiceDefaultRoutingPolicy
    (Updatable) Routing policy for the virtual service.
    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
    freeformTags Map<String,Object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    hosts List<String>
    (Updatable) The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    lifecycleDetails String
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
    meshId String
    The OCID of the service mesh in which this virtual service is created.
    mtls VirtualServiceMtls
    (Updatable) The mTLS authentication mode to use when receiving requests from other virtual services or ingress gateways within the mesh.
    name String

    A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example: My unique resource name

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state String
    The current state of the Resource.
    systemTags Map<String,Object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The time when this resource was created in an RFC3339 formatted datetime string.
    timeUpdated String
    The time when this resource was updated in an RFC3339 formatted datetime string.
    compartmentId string
    (Updatable) The OCID of the compartment.
    defaultRoutingPolicy VirtualServiceDefaultRoutingPolicy
    (Updatable) Routing policy for the virtual service.
    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    (Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
    freeformTags {[key: string]: any}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    hosts string[]
    (Updatable) The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    lifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
    meshId string
    The OCID of the service mesh in which this virtual service is created.
    mtls VirtualServiceMtls
    (Updatable) The mTLS authentication mode to use when receiving requests from other virtual services or ingress gateways within the mesh.
    name string

    A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example: My unique resource name

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state string
    The current state of the Resource.
    systemTags {[key: string]: any}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    The time when this resource was created in an RFC3339 formatted datetime string.
    timeUpdated string
    The time when this resource was updated in an RFC3339 formatted datetime string.
    compartment_id str
    (Updatable) The OCID of the compartment.
    default_routing_policy servicemesh.VirtualServiceDefaultRoutingPolicyArgs
    (Updatable) Routing policy for the virtual service.
    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description str
    (Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
    freeform_tags Mapping[str, Any]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    hosts Sequence[str]
    (Updatable) The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    lifecycle_details str
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
    mesh_id str
    The OCID of the service mesh in which this virtual service is created.
    mtls servicemesh.VirtualServiceMtlsArgs
    (Updatable) The mTLS authentication mode to use when receiving requests from other virtual services or ingress gateways within the mesh.
    name str

    A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example: My unique resource name

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state str
    The current state of the Resource.
    system_tags Mapping[str, Any]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created str
    The time when this resource was created in an RFC3339 formatted datetime string.
    time_updated str
    The time when this resource was updated in an RFC3339 formatted datetime string.
    compartmentId String
    (Updatable) The OCID of the compartment.
    defaultRoutingPolicy Property Map
    (Updatable) Routing policy for the virtual service.
    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
    freeformTags Map<Any>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    hosts List<String>
    (Updatable) The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    lifecycleDetails String
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
    meshId String
    The OCID of the service mesh in which this virtual service is created.
    mtls Property Map
    (Updatable) The mTLS authentication mode to use when receiving requests from other virtual services or ingress gateways within the mesh.
    name String

    A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example: My unique resource name

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state String
    The current state of the Resource.
    systemTags Map<Any>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The time when this resource was created in an RFC3339 formatted datetime string.
    timeUpdated String
    The time when this resource was updated in an RFC3339 formatted datetime string.

    Supporting Types

    VirtualServiceDefaultRoutingPolicy, VirtualServiceDefaultRoutingPolicyArgs

    Type string
    (Updatable) Type of the virtual service routing policy.
    Type string
    (Updatable) Type of the virtual service routing policy.
    type String
    (Updatable) Type of the virtual service routing policy.
    type string
    (Updatable) Type of the virtual service routing policy.
    type str
    (Updatable) Type of the virtual service routing policy.
    type String
    (Updatable) Type of the virtual service routing policy.

    VirtualServiceMtls, VirtualServiceMtlsArgs

    Mode string
    (Updatable) DISABLED: Connection is not tunneled. PERMISSIVE: Connection can be either plaintext or an mTLS tunnel. STRICT: Connection is an mTLS tunnel. Clients without a valid certificate will be rejected.
    CertificateId string
    The OCID of the certificate resource that will be used for mTLS authentication with other virtual services in the mesh.
    MaximumValidity int
    (Updatable) The number of days the mTLS certificate is valid. This value should be less than the Maximum Validity Duration for Certificates (Days) setting on the Certificate Authority associated with this Mesh. The certificate will be automatically renewed after 2/3 of the validity period, so a certificate with a maximum validity of 45 days will be renewed every 30 days.
    Mode string
    (Updatable) DISABLED: Connection is not tunneled. PERMISSIVE: Connection can be either plaintext or an mTLS tunnel. STRICT: Connection is an mTLS tunnel. Clients without a valid certificate will be rejected.
    CertificateId string
    The OCID of the certificate resource that will be used for mTLS authentication with other virtual services in the mesh.
    MaximumValidity int
    (Updatable) The number of days the mTLS certificate is valid. This value should be less than the Maximum Validity Duration for Certificates (Days) setting on the Certificate Authority associated with this Mesh. The certificate will be automatically renewed after 2/3 of the validity period, so a certificate with a maximum validity of 45 days will be renewed every 30 days.
    mode String
    (Updatable) DISABLED: Connection is not tunneled. PERMISSIVE: Connection can be either plaintext or an mTLS tunnel. STRICT: Connection is an mTLS tunnel. Clients without a valid certificate will be rejected.
    certificateId String
    The OCID of the certificate resource that will be used for mTLS authentication with other virtual services in the mesh.
    maximumValidity Integer
    (Updatable) The number of days the mTLS certificate is valid. This value should be less than the Maximum Validity Duration for Certificates (Days) setting on the Certificate Authority associated with this Mesh. The certificate will be automatically renewed after 2/3 of the validity period, so a certificate with a maximum validity of 45 days will be renewed every 30 days.
    mode string
    (Updatable) DISABLED: Connection is not tunneled. PERMISSIVE: Connection can be either plaintext or an mTLS tunnel. STRICT: Connection is an mTLS tunnel. Clients without a valid certificate will be rejected.
    certificateId string
    The OCID of the certificate resource that will be used for mTLS authentication with other virtual services in the mesh.
    maximumValidity number
    (Updatable) The number of days the mTLS certificate is valid. This value should be less than the Maximum Validity Duration for Certificates (Days) setting on the Certificate Authority associated with this Mesh. The certificate will be automatically renewed after 2/3 of the validity period, so a certificate with a maximum validity of 45 days will be renewed every 30 days.
    mode str
    (Updatable) DISABLED: Connection is not tunneled. PERMISSIVE: Connection can be either plaintext or an mTLS tunnel. STRICT: Connection is an mTLS tunnel. Clients without a valid certificate will be rejected.
    certificate_id str
    The OCID of the certificate resource that will be used for mTLS authentication with other virtual services in the mesh.
    maximum_validity int
    (Updatable) The number of days the mTLS certificate is valid. This value should be less than the Maximum Validity Duration for Certificates (Days) setting on the Certificate Authority associated with this Mesh. The certificate will be automatically renewed after 2/3 of the validity period, so a certificate with a maximum validity of 45 days will be renewed every 30 days.
    mode String
    (Updatable) DISABLED: Connection is not tunneled. PERMISSIVE: Connection can be either plaintext or an mTLS tunnel. STRICT: Connection is an mTLS tunnel. Clients without a valid certificate will be rejected.
    certificateId String
    The OCID of the certificate resource that will be used for mTLS authentication with other virtual services in the mesh.
    maximumValidity Number
    (Updatable) The number of days the mTLS certificate is valid. This value should be less than the Maximum Validity Duration for Certificates (Days) setting on the Certificate Authority associated with this Mesh. The certificate will be automatically renewed after 2/3 of the validity period, so a certificate with a maximum validity of 45 days will be renewed every 30 days.

    Import

    VirtualServices can be imported using the id, e.g.

    $ pulumi import oci:ServiceMesh/virtualService:VirtualService test_virtual_service "id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi