alicloud_service_mesh_service_mesh

Provides a Service Mesh Service Mesh resource.

For information about Service Mesh Service Mesh and how to use it, see What is Service Mesh.

Example Usage

Basic Usage

provider "alicloud" {
  region = "cn-hangzhou"
}
variable "name" {
  default = "tf_example"
}

data "alicloud_zones" "default" {
  available_resource_creation = "VSwitch"
}
data "alicloud_service_mesh_versions" "default" {
  edition = "Default"
}

resource "alicloud_vpc" "default" {
  vpc_name   = var.name
  cidr_block = "10.0.0.0/8"
}
resource "alicloud_vswitch" "default" {
  vswitch_name = var.name
  cidr_block   = "10.1.0.0/16"
  vpc_id       = alicloud_vpc.default.id
  zone_id      = data.alicloud_zones.default.zones.0.id
}

resource "alicloud_service_mesh_service_mesh" "default" {
  service_mesh_name = var.name
  edition           = "Default"
  version           = reverse(data.alicloud_service_mesh_versions.default.versions).0.version
  cluster_spec      = "standard"
  network {
    vpc_id        = alicloud_vpc.default.id
    vswitche_list = [alicloud_vswitch.default.id]
  }
  load_balancer {
    pilot_public_eip      = false
    api_server_public_eip = false
  }
}

creating an enterprise cluster

variable "name" {
  default = "tf_example"
}

data "alicloud_zones" "default" {
  available_resource_creation = "VSwitch"
}
data "alicloud_service_mesh_versions" "default" {
  edition = "Default"
}

resource "alicloud_vpc" "default" {
  vpc_name   = var.name
  cidr_block = "10.0.0.0/8"
}
resource "alicloud_vswitch" "default" {
  vswitch_name = var.name
  cidr_block   = "10.1.0.0/16"
  vpc_id       = alicloud_vpc.default.id
  zone_id      = data.alicloud_zones.default.zones.0.id
}

resource "alicloud_service_mesh_service_mesh" "default" {
  service_mesh_name = var.name
  edition           = "Pro"
  version           = reverse(data.alicloud_service_mesh_versions.default.versions).0.version
  cluster_spec      = "enterprise"
  network {
    vpc_id        = alicloud_vpc.default.id
    vswitche_list = [alicloud_vswitch.default.id]
  }
  load_balancer {
    pilot_public_eip      = false
    api_server_public_eip = false
  }
}

Argument Reference

The following arguments are supported:

extra_configuration

The extra_configuration supports the following:

load_balancer

The load_balancer supports the following:

mesh_config

The mesh_config supports the following:

mesh_config-access_log

The access_log supports the following:

mesh_config-audit

The audit supports the following:

mesh_config-control_plane_log

The control_plane_log supports the following:

mesh_config-kiali

The kiali supports the following:

mesh_config-opa

The opa supports the following:

mesh_config-pilot

The pilot supports the following:

mesh_config-proxy

The proxy supports the following:

mesh_config-sidecar_injector

The sidecar_injector supports the following:

mesh_config-sidecar_injector-init_cni_configuration

The init_cni_configuration supports the following:

network

The network supports the following:

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Service Mesh Service Mesh can be imported using the id, e.g.

$ terraform import alicloud_service_mesh_service_mesh.example <id>