GithubHelp home page GithubHelp logo

jason-zhang9309 / terraform-huaweicloud-cce Goto Github PK

View Code? Open in Web Editor NEW

This project forked from terraform-huaweicloud-modules/terraform-huaweicloud-cce

0.0 1.0 0.0 42 KB

License: Apache License 2.0

HCL 100.00%

terraform-huaweicloud-cce's Introduction

The Terraform module of HUAWEI Cloud CCE service

The terraform module for one-click deployment of CCE Cluster and related resources.

Usage

variable "vpc_id" {}
variable "subnet_id" {}
variable "availability_zones" {
  type = list(string)
}
variable "cce_cluster_type" {}
variable "cce_cluster_flavor" {}
variable "cce_container_network_type" {}
variable "cce_container_network_cidr" {}
variable "cce_cluster_name" {}
variable "cce_cluster_authentication_mode" {}

module "cce_service" {
  source = "terraform-huaweicloud-modules/terraform-huaweicloud-cce"

  vpc_id             = var.vpc_id
  subnet_id          = var.subnet_id
  availability_zones = var.availability_zones

  cluster_type           = var.cce_cluster_type
  cluster_flavor         = var.cce_cluster_flavor
  container_network_type = var.cce_container_network_type
  container_network_cidr = var.cce_container_network_cidr
  cluster_name           = var.cce_cluster_name
  authentication_mode    = var.cce_cluster_authentication_mode
  is_delete_all          = true

  nodes_configuration = [
    {
      name               = "simple-cce-node-via-modules"
      flavor_id          = "s6.large.2"
      os                 = "EulerOS 2.9"
      password           = "Test@123"
      tags = {
        Creator = "terraform-huaweicloud-cce"
      }

      data_volumes = [{
        type = "SSD"
        size = 100
      }]

      extend_params = {
        max_pods = 5
      }
    }
  ]

  node_pools_configuration = [
    {
      name               = "simple-cce-node-pool-via-modules"
      flavor_id          = "s6.large.2"
      os                 = "EulerOS 2.9"
      initial_node_count = 1
      password           = "Test@123"
      tags = {
        Creator = "terraform-huaweicloud-cce"
      }

      data_volumes = [{
        type = "SSD"
        size = 100
      }]

      extend_params = {
        max_pods = 5
      }
    }
  ]
}

Contributing

Report issues/questions/feature requests in the issues section.

Full contributing guidelines are covered here.

Requirements

Name Version
Terraform >= 1.3.0
Huaweicloud Provider >= 1.57.0

Resources

Name Type
huaweicloud_cce_cluster.this resource
huaweicloud_cce_node.this resource
huaweicloud_cce_node_pool.this resource

Inputs

Name Description Type Default Required
charging_mode The charging mode of the CCE resources string null N
period_unit The period unit of the pre-paid purchase string null N
period The period number of the pre-paid purchase number null N
is_auto_renew Whether to automatically renew after expiration for CCE resourcess bool null N
name_suffix The suffix string of name for all CCE resources string "" N
vpc_id The ID of the VPC to which the CCE resources belongs string null N
subnet_id The ID of the VPC subnet to which the CCE resources belongs string null N
subnet_fixed_ip The fixed IP of the related subnet of the CCE node string null N
availability_zones The list of availability zones where the CCE resources are located list(string) [] N
is_cluster_create Controls whether a CCE cluster should be created (it affects all CCE related resources under this module) bool true N
cluster_type The type of the CCE cluster string "VirtualMachine" N
cluster_version The specified version of the CCE cluster string null N
cluster_flavor The flavor ID (e.g. cce.s2.medium) of the CCE cluster string null N
container_network_type The container network type of the CCE cluster string null N
container_network_cidr The container network CIDR of the CCE cluster string null N
service_network_cidr The service network type of the CCE cluster string null N
cluster_public_access Whether to enable public access of the CCE cluster bool false N
cluster_eip_address The EIP address of the CCE cluster string null N
cluster_eip_type The EIP type of the CCE cluster string 5_bgp N
cluster_eip_bandwidth_name The EIP bandwidth name of CCE cluster string null N
cluster_eip_bandwidth_charge_mode The EIP bandwidth charge mode of CCE cluster string traffic N
cluster_eip_bandwidth_size The EIP bandwidth size of CCE cluster string 8 N
cluster_eip_bandwidth_share_type The EIP bandwidth share type of CCE cluster string PER N
eni_subnet_ids The ID of the VPC subnet for CCE turbo resource creation list(string) null N
cluster_name The name of the CCE cluster string "" N
cluster_description The description content of the CCE cluster string null N
enterprise_project_id The ID of the enterprise project to which the CCE cluster belongs string null N
authentication_mode The authentication mode of the CCE cluster string null N
authenticating_proxy_ca The x509 CA certificate of the authentication proxy of the CCE cluster string null N
authenticating_proxy_cert The client certificate of the authentication proxy of the CCE cluster string null N
authenticating_proxy_private_key The private key of the authentication proxy of the CCE cluster string null N
kube_proxy_mode The service forwarding mode of the CCE cluster string null N
cluster_extend_params The extend parameters of the CCE cluster map(string) null N
cluster_multi_availability_zones The list of availability zones where the CCE cluster is located list(string) [] N
cluster_tags The tags of CCE cluster map(string) null N
is_delete_evs Whether to delete associated EVS disks when deleting the CCE cluster bool null N
is_delete_obs Whether to delete associated OBS buckets when deleting the CCE cluster bool null N
is_delete_sfs Whether to delete associated SFS file systems when deleting the CCE cluster bool null N
is_delete_efs Whether to delete associated SFS Turbos when deleting the CCE cluster bool null N
is_delete_all Whether to delete all associated resources when deleting the CCE cluster bool null N
nodes_configuration The configuration of the CCE nodes
list(object({
name = optional(string, null)
flavor_id = optional(string, null)
os = optional(string, "EulerOS 2.9")
key_pair = optional(string, null)
password = optional(string, null)
private_key = optional(string, null)
fixed_ip = optional(string, null)
ecs_group_id = optional(string, null)
dedicated_host_id = optional(string, null)
initialized_conditions = optional(list(string), null)
labels = optional(map(string), null)
tags = optional(map(string), null)
runtime = optional(string, null)

eip_id = optional(string, null)
iptype = optional(string, null)
bandwidth_charge_mode = optional(string, null)
bandwidth_size = optional(string, null)
sharetype = optional(string, null)

extend_params = optional(object({
max_pods = optional(number, null)
docker_base_size = optional(number, null)
preinstall = optional(string, null)
postinstall = optional(string, null)
node_image_id = optional(string, null)
node_multi_queue = optional(string, null)
nic_threshold = optional(string, null)
agency_name = optional(string, null)
kube_reserved_mem = optional(number, null)
system_reserved_mem = optional(number, null)
}),
null
)

taints = optional(list(object({
key = string
value = string
effect = string
})),
[]
)

root_volume = optional(object({
type = optional(string, "SSD")
size = optional(number, 50)
extend_params = optional(map(string), null)
kms_key_id = optional(string, null)
dss_pool_id = optional(string, null)
}),
{
type = "SSD"
size = 50
}
)

data_volumes = optional(list(object({
type = optional(string, "SSD")
size = optional(number, 100)
extend_params = optional(map(string), null)
kms_key_id = optional(string, null)
dss_pool_id = optional(string, null)
})),
[
{
type = "SSD"
size = 100
}
]
)

storage = optional(object({
selectors = optional(list(object({
name = string
type = optional(string, "evs")
match_label_size = optional(number, 100)
match_label_volume_type = optional(string, null)
match_label_metadata_encrypted = optional(string, null)
match_label_metadata_cmkid = optional(string, null)
match_label_count = optional(number, null)
})), null)
groups = optional(list(object({
name = string
selector_names = list(string)
cce_managed = optional(string, null)
virtual_spaces = list(object({
name = string
size = string
lvm_lv_type = optional(string, null)
lvm_path = optional(string, null)
runtime_lv_type = optional(string, null)
}))
})), null)
}),
null
)
}))
[] N
node_pools_configuration The configuration of the CCE node pools
type = list(object({
name = optional(string, null)
initial_node_count = optional(number, 1)
flavor_id = optional(string, null)
type = optional(string, null)
os = optional(string, "EulerOS 2.9")
key_pair = optional(string, null)
password = optional(string, null)
ecs_group_id = optional(string, null)
extend_param = optional(map(string), null)
scale_enable = optional(bool, null)
min_node_count = optional(number, null)
max_node_count = optional(number, null)
scale_down_cooldown_time = optional(number, null)
priority = optional(number, null)
security_groups = optional(list(string), null)
pod_security_groups = optional(list(string), null)
initialized_conditions = optional(list(string), null)
labels = optional(map(string), null)
tags = optional(map(string), null)
runtime = optional(string, null)

extend_params = optional(object({
max_pods = optional(number, null)
docker_base_size = optional(number, null)
preinstall = optional(string, null)
postinstall = optional(string, null)
node_image_id = optional(string, null)
node_multi_queue = optional(string, null)
nic_threshold = optional(string, null)
agency_name = optional(string, null)
kube_reserved_mem = optional(number, null)
system_reserved_mem = optional(number, null)
}),
null
)

taints = optional(list(object({
key = string
value = string
effect = string
})),
[]
)

root_volume = optional(object({
type = optional(string, "SSD")
size = optional(number, 50)
extend_params = optional(map(string), null)
kms_key_id = optional(string, null)
dss_pool_id = optional(string, null)
}),
{
type = "SSD"
size = 50
}
)

data_volumes = optional(list(object({
type = optional(string, "SSD")
size = optional(number, 100)
extend_params = optional(map(string), null)
kms_key_id = optional(string, null)
dss_pool_id = optional(string, null)
})),
[
{
type = "SSD"
size = 100
}
]
)

storage = optional(object({
selectors = optional(list(object({
name = string
type = optional(string, "evs")
match_label_size = optional(number, 100)
match_label_volume_type = optional(string, null)
match_label_metadata_encrypted = optional(string, null)
match_label_metadata_cmkid = optional(string, null)
match_label_count = optional(number, null)
})), null)
groups = optional(list(object({
name = string
selector_names = list(string)
cce_managed = optional(string, null)
virtual_spaces = list(object({
name = string
size = string
lvm_lv_type = optional(string, null)
lvm_path = optional(string, null)
runtime_lv_type = optional(string, null)
}))
})), null)
}),
null
)
}))
[] N

Outputs

Name Description
cluster_id The CCE cluster ID (When multiple clusters are created, the ID of the first cluster is returned)
cluster_ids The ID list of all CCE cluster resources
clsuter_security_group_ids The ID list of the security groups to which each CCE cluster resource belongs
cluster_statuses The status list for all CCE cluster resources
cluster_kube_config_raw The raw Kubernetes config to be used by kubectl and other compatible tools
cluster_certificate_clusters The certificate clusters
cluster_certificate_users The certificate users
node_id The CCE node ID (When multiple nodes are created, the ID of the first node is returned)
node_ids The ID list for all CCE node resources
node_public_ips The list of public IP addresses for all CCE node resources
node_pool_id The CCE node pool ID
node_pool_ids The ID list for all CCE node pool resources

terraform-huaweicloud-cce's People

Contributors

jason-zhang9309 avatar lance52259 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.