Skip to content

cloud-labs-infra/terraform-huaweicloud-cce-cluster

Repository files navigation

Huawei Cloud Container Engine Cluster

Requirements

Name Version
terraform ~> 1.7
huaweicloud ~>1.63

Providers

Name Version
huaweicloud ~>1.63

Modules

Name Source Version
eip_cce_cluster cloud-labs-infra/eip/huaweicloud 1.0.0

Resources

Name Type
huaweicloud_cce_cluster.main resource
huaweicloud_availability_zones.zones data source

Inputs

Name Description Type Default Required
authenticating_proxy Specifies the Certificate provided for the authenticating_proxy mode.
The input value can be a Base64 encoded string or not.

* ca - CA root certificate;
* cert - Client certificate;
* private_key - Private Key of the client certificate.
object({
ca = optional(string)
cert = optional(string)
private_key = optional(string)
})
{} no
authentication_mode Specifies the authentication mode of the cluster string "rbac" no
availability_zones Specifies the availability zone of the master node, if omitted, AZ calculates automatically list(string) [] no
cce_public Enable public address for Kubernetes API bool false no
cluster_eip EIP configuration
Possible values for type are '5_bgp' (dynamic BGP) and '5_sbgp' (static BGP)
object({
type = optional(string, "5_bgp")
ip_address = optional(string, null)
ip_version = optional(number, 4)
bandwidth = object({
size = optional(number, 5)
share_type = optional(string, "PER")
charge_mode = optional(string, "traffic")
})
})
{
"bandwidth": {}
}
no
cluster_type Specifies the cluster type string "VirtualMachine" no
cluster_version Specifies the cluster version string "v1.23" no
container_network_cidr Specifies the container network segment string null no
container_network_type Specifies the container network type:

* overlay_l2: An overlay_l2 network built for containers by using Open vSwitch(OVS);
* vpc-router: An vpc-router network built for containers by using ipvlan and custom VPC routes;
* eni: A Yangtse network built for CCE Turbo cluster. The container network deeply integrates the native ENI
capability of VPC, uses the VPC CIDR block to allocate container addresses, and supports direct connections
between ELB and containers to provide high performance.
string "overlay_l2" no
delete Specified whether to delete associated resources when deleting the CCE cluster:

evs - EVS disks;
obs - OBS buckets;
sfs - SFS file systems;
efs - SFS Turbo file systems;
eni - Network interfaces;
net - Networks.
object({
evs = optional(string, "false")
eni = optional(string, "false")
obs = optional(string, "false")
sfs = optional(string, "false")
efs = optional(string, "false")
net = optional(string, "false")
})
{} no
delete_all Specified whether to delete all associated storage resources when deleting the CCE cluster string "false" no
description Specifies the cluster description string null no
eni_subnet_cidr Specifies the ENI network segment, specified when creating a CCE Turbo cluster string null no
eni_subnet_id Specifies the IPv4 subnet ID of the subnet where the ENI resides, specified when creating a CCE Turbo cluster string null no
extend_param Specifies the extended parameter map(string) {} no
flavor_id Specifies the cluster specifications:

* cce.s1.small: small-scale single cluster (up to 50 nodes);
* cce.s1.medium: medium-scale single cluster (up to 200 nodes);
* cce.s2.small: small-scale HA cluster (up to 50 nodes);
* cce.s2.medium: medium-scale HA cluster (up to 200 nodes);
* cce.s2.large: large-scale HA cluster (up to 1000 nodes);
* cce.s2.xlarge: large-scale HA cluster (up to 2000 nodes).
string "cce.s1.small" no
hibernate Specifies whether to hibernate the CCE cluster bool false no
kube_proxy_mode Specifies the service forwarding mode:

* iptables - Traditional kube-proxy uses iptables rules to implement service load balancing;
* ipvs - Optimized kube-proxy mode with higher throughput and faster speed.
string "iptables" no
name Specifies the cluster name string n/a yes
name_postfix Specifies the cluster name postfix string null no
region Specifies the region in which to create the CCE cluster resource, if omitted, the provider-level region will be used string null no
service_network_cidr Specifies the service network segment string null no
subnet_id Specifies the network ID of a subnet string n/a yes
tags Specifies the key/value pairs to associate with the resources map(string) {} no
vpc_id Specifies the VPC ID string n/a yes

Outputs

Name Description
certificate_clusters The certificate clusters:

* name - The cluster name;
* server - The server IP address;
* certificate_authority_data - The certificate data.
certificate_users The certificate clusters:

* name - The user name;
* client_certificate_data - The client certificate data;
* client_key_data - The client key data.
id ID of the cluster resource
kube_config_raw Raw Kubernetes config to be used by kubectl and other compatible tools
security_group_id Security group ID of the cluster
status Cluster status information