English | 简体中文
Terraform module which create a networking environment for Kubernetes cluster on Alibaba Cloud.
These types of resources are supported:
module "k8s_networking" {
source = "terraform-alicloud-modules/kubernetes-networking/alicloud"
name = "tf_k8s_networking"
// You can specify an existing VPC ID to create the network
// existing_vpc_id = "vpc-2ze2w07mcyxxxxxx"
vpc_cidr = "10.1.0.0/21"
availability_zones = ["cn-zhangjiakou-a", "cn-zhangjiakou-b", "cn-zhangjiakou-c"]
vswitch_cidrs = ["10.1.3.0/25", "10.1.4.0/25", "10.1.4.128/25"]
}
From the version v1.2.0, the module has removed the following provider
setting:
provider "alicloud" {
profile = var.profile != "" ? var.profile : null
shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null
region = var.region != "" ? var.region : null
skip_region_validation = var.skip_region_validation
configuration_source = "terraform-alicloud-modules/kubernetes-networking"
}
If you still want to use the provider
setting to apply this module, you can specify a supported version, like 1.1.0:
module "k8s_networking" {
source = "terraform-alicloud-modules/kubernetes-networking/alicloud"
version = "1.1.0"
region = "cn-beijing"
profile = "Your-Profile-Name"
name = "tf_k8s_networking"
vpc_cidr = "10.1.0.0/21"
// ...
}
If you want to upgrade the module to 1.2.0 or higher in-place, you can define a provider which same region with previous region:
provider "alicloud" {
region = "cn-beijing"
profile = "Your-Profile-Name"
}
module "k8s_networking" {
source = "terraform-alicloud-modules/kubernetes-networking/alicloud"
name = "tf_k8s_networking"
vpc_cidr = "10.1.0.0/21"
// ...
}
or specify an alias provider with a defined region to the module using providers
:
provider "alicloud" {
region = "cn-beijing"
profile = "Your-Profile-Name"
alias = "bj"
}
module "k8s_networking" {
source = "terraform-alicloud-modules/kubernetes-networking/alicloud"
providers = {
alicloud = alicloud.bj
}
name = "tf_k8s_networking"
vpc_cidr = "10.1.0.0/21"
// ...
}
and then run terraform init
and terraform apply
to make the defined provider effect to the existing module state.
More details see How to use provider in the module
Name | Version |
---|---|
terraform | >= 0.13.0 |
alicloud | >= 1.56.0 |
If you have any problems when using this module, please opening a provider issue and let us know.
Note: There does not recommend to open an issue on this repo.
Created and maintained by Alibaba Cloud Terraform Team([email protected])
Apache 2 Licensed. See LICENSE for full details.