oci_service_mesh_virtual_service

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

Creates a new VirtualService.

Example Usage

resource "oci_service_mesh_virtual_service" "test_virtual_service" {
    #Required
    compartment_id = var.compartment_id
    mesh_id = oci_service_mesh_mesh.test_mesh.id
    name = var.virtual_service_name

    #Optional
    default_routing_policy {
        #Required
        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 {
        #Required
        mode = var.virtual_service_mtls_mode

        #Optional
        maximum_validity = var.virtual_service_mtls_maximum_validity
    }
}

Argument Reference

The following arguments are supported:

* 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

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Virtual Service * update - (Defaults to 20 minutes), when updating the Virtual Service * delete - (Defaults to 20 minutes), when destroying the Virtual Service

Import

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

$ terraform import oci_service_mesh_virtual_service.test_virtual_service "id"