» oci_containerengine_cluster

This resource provides the Cluster resource in Oracle Cloud Infrastructure Container Engine service.

Create a new cluster.

» Example Usage

resource "oci_containerengine_cluster" "test_cluster" {
    #Required
    compartment_id = "${var.compartment_id}"
    kubernetes_version = "${var.cluster_kubernetes_version}"
    name = "${var.cluster_name}"
    vcn_id = "${oci_core_vcn.test_vcn.id}"

    #Optional
    kms_key_id = "${oci_kms_key.test_key.id}"
    options {

        #Optional
        add_ons {

            #Optional
            is_kubernetes_dashboard_enabled = "${var.cluster_options_add_ons_is_kubernetes_dashboard_enabled}"
            is_tiller_enabled = "${var.cluster_options_add_ons_is_tiller_enabled}"
        }
        kubernetes_network_config {

            #Optional
            pods_cidr = "${var.cluster_options_kubernetes_network_config_pods_cidr}"
            services_cidr = "${var.cluster_options_kubernetes_network_config_services_cidr}"
        }
        service_lb_subnet_ids = "${var.cluster_options_service_lb_subnet_ids}"
    }
}

» Argument Reference

The following arguments are supported:

  • compartment_id - (Required) The OCID of the compartment in which to create the cluster.
  • kms_key_id - (Optional) The OCID of the KMS key to be used as the master encryption key for Kubernetes secret encryption. When used, kubernetesVersion must be at least v1.13.0.
  • kubernetes_version - (Required) (Updatable) The version of Kubernetes to install into the cluster masters.
  • name - (Required) (Updatable) The name of the cluster. Avoid entering confidential information.
  • options - (Optional) Optional attributes for the cluster.
  • vcn_id - (Required) The OCID of the virtual cloud network (VCN) in which to create the cluster.

** 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:

» Import

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

$ terraform import oci_containerengine_cluster.test_cluster "id"