├── examples └── complete │ ├── variables.tf │ ├── versions.tf │ ├── README.md │ ├── outputs.tf │ └── main.tf ├── local.tf ├── versions.tf ├── .gitignore ├── LICENSE ├── outputs.tf ├── .github └── workflows │ ├── release.yml │ ├── weekly_e2e.yml │ └── e2e.yml ├── .releaserc.json ├── CHANGELOG.md ├── scripts ├── curl_fc_trigger.go ├── terraform-test.sh └── e2e_check.go ├── main.tf ├── variables.tf ├── README.md └── TestRecord.md /examples/complete/variables.tf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /local.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | subscription = var.instance_charge_type == "PostPaid" ? {} : var.subscription 3 | } -------------------------------------------------------------------------------- /versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = ">= 0.13" 3 | required_providers { 4 | alicloud = { 5 | source = "hashicorp/alicloud" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/complete/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = ">= 0.13" 3 | required_providers { 4 | alicloud = { 5 | source = "hashicorp/alicloud" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # used for testing 2 | *.tfvars 3 | 4 | # Compiled files 5 | *.tfstate 6 | *.tfstate.backup 7 | 8 | # Module directory 9 | .terraform/ 10 | 11 | # terraform log 12 | *.log 13 | 14 | # auto-generated key pair file 15 | *.pem 16 | 17 | # tools files 18 | .DS_Store 19 | .idea 20 | 21 | # others 22 | *.bak 23 | *.bk 24 | 25 | -------------------------------------------------------------------------------- /examples/complete/README.md: -------------------------------------------------------------------------------- 1 | Terraform module for creating Kubernetes Cluster on Alibaba Cloud. 2 | terraform-alicloud-kubernetes 3 | ===================================================================== 4 | 5 | ## Usage 6 | 7 | To run this example you need to execute: 8 | 9 | ```bash 10 | $ terraform init 11 | $ terraform plan 12 | $ terraform apply 13 | ``` 14 | 15 | Note that this example will create resources which cost money. Run `terraform destroy` when you don't need these resources. 16 | 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Terraform Alibaba Cloud Modules 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /outputs.tf: -------------------------------------------------------------------------------- 1 | # Output VPC 2 | output "vpc_id" { 3 | description = "The ID of the VPC." 4 | value = alicloud_cs_kubernetes.k8s[0].vpc_id 5 | } 6 | 7 | output "vswitch_ids" { 8 | description = "List ID of the VSwitches." 9 | value = [alicloud_cs_kubernetes.k8s[*].vswitch_ids] 10 | } 11 | 12 | output "nat_gateway_id" { 13 | description = "The ID of the NAT Gateway." 14 | value = alicloud_cs_kubernetes.k8s[0].nat_gateway_id 15 | } 16 | 17 | # Output kubernetes resource 18 | output "cluster_id" { 19 | description = "ID of the kunernetes cluster." 20 | value = alicloud_cs_kubernetes.k8s[*].id 21 | } 22 | 23 | output "security_group_id" { 24 | description = "ID of the Security Group used to deploy kubernetes cluster." 25 | value = alicloud_cs_kubernetes.k8s[0].security_group_id 26 | } 27 | 28 | output "cluster_nodes" { 29 | description = "List nodes of cluster." 30 | value = alicloud_cs_kubernetes.k8s[*].worker_nodes 31 | } 32 | 33 | output "this_k8s_node_ids" { 34 | description = "List ids of of cluster node." 35 | value = [for _, obj in concat(alicloud_cs_kubernetes.k8s[*].worker_nodes, [{}])[0] : obj["id"]] 36 | } 37 | -------------------------------------------------------------------------------- /examples/complete/outputs.tf: -------------------------------------------------------------------------------- 1 | # Output VPC 2 | output "vpc_id" { 3 | description = "The ID of the VPC." 4 | value = module.k8s.vpc_id 5 | } 6 | 7 | output "vswitch_ids" { 8 | description = "List ID of the VSwitches." 9 | value = module.k8s.vswitch_ids 10 | } 11 | 12 | output "nat_gateway_id" { 13 | description = "The ID of the NAT Gateway." 14 | value = module.k8s.nat_gateway_id 15 | } 16 | 17 | # Output kubernetes resource 18 | output "cluster_id" { 19 | description = "ID of the kunernetes cluster." 20 | value = module.k8s.cluster_id 21 | } 22 | 23 | output "security_group_id" { 24 | description = "ID of the Security Group used to deploy kubernetes cluster." 25 | value = module.k8s.security_group_id 26 | } 27 | 28 | output "cluster_nodes" { 29 | description = "List nodes of cluster." 30 | value = module.k8s.cluster_nodes 31 | } 32 | 33 | output "this_k8s_node_ids" { 34 | description = "List ids of of cluster node." 35 | value = module.k8s.this_k8s_node_ids 36 | } 37 | 38 | output "output_file" { 39 | description = "The name of the output file." 40 | value = data.alicloud_cs_cluster_credential.auth.output_file 41 | 42 | } 43 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | release: 8 | name: Release 9 | runs-on: ubuntu-latest 10 | if: github.repository_owner == 'alibabacloud-automation' && github.actor == 'shanye997' 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v4 14 | with: 15 | persist-credentials: false 16 | fetch-depth: 0 17 | 18 | - name: Release 19 | id: semantic 20 | uses: cycjimmy/semantic-release-action@v4 21 | with: 22 | semantic_version: 23.0.2 23 | extra_plugins: | 24 | @semantic-release/changelog@6.0.3 25 | @semantic-release/git@10.0.1 26 | conventional-changelog-conventionalcommits@7.0.2 27 | env: 28 | GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} 29 | 30 | - name: Trigger Metadata Upload 31 | if: steps.semantic.outputs.new_release_published == 'true' 32 | run: | 33 | url="${{ secrets.FC_UPLOAD_META_ENDPOINT }}/?from=git&syncModuleMeta=true&moduleName=${{ github.event.repository.name }}&moduleVersion=${{ steps.semantic.outputs.new_release_version }}" 34 | echo "Uploading metadata to $url" 35 | curl -H "X-Fc-Invocation-Type:Async" \ 36 | -s "$url" 37 | -------------------------------------------------------------------------------- /.releaserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "branches": [ 3 | "main", 4 | "master" 5 | ], 6 | "plugins": [ 7 | [ 8 | "@semantic-release/commit-analyzer", 9 | { 10 | "preset": "conventionalcommits", 11 | "releaseRules": [ 12 | { 13 | "type": "docs", 14 | "release": "patch" 15 | } 16 | ] 17 | } 18 | ], 19 | [ 20 | "@semantic-release/release-notes-generator", 21 | { 22 | "preset": "conventionalcommits" 23 | } 24 | ], 25 | [ 26 | "@semantic-release/github", 27 | { 28 | "successComment": false, 29 | "labels": false, 30 | "releasedLabels": false 31 | } 32 | ], 33 | [ 34 | "@semantic-release/changelog", 35 | { 36 | "changelogFile": "CHANGELOG.md" 37 | } 38 | ], 39 | [ 40 | "@semantic-release/git", 41 | { 42 | "assets": [ 43 | "CHANGELOG.md" 44 | ], 45 | "message": "chore(release): CHANGELOG v${nextRelease.version}" 46 | } 47 | ] 48 | ] 49 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 2.1.0 (Unreleased) 2 | ## 2.0.0 (February 13, 2025) 3 | 4 | - module: remove unused variables [GH-13](https://github.com/alibabacloud-automation/terraform-alicloud-kubernetes/pull/13) 5 | 6 | ## 1.5.0 (March 12, 2024) 7 | 8 | ENHANCEMENTS: 9 | 10 | - Add resource alicloud_cs_kubernetes_node_pool [GH-11](https://github.com/alibabacloud-automation/terraform-alicloud-kubernetes/pull/11) 11 | 12 | 13 | ## 1.4.0 (December 10, 2021) 14 | 15 | ENHANCEMENTS: 16 | 17 | - Removes the provider setting and improves the Readme [GH-8](https://github.com/terraform-alicloud-modules/terraform-alicloud-kubernetes/pull/8) 18 | 19 | ## 1.3.0 (Jun 26,2020) 20 | 21 | IMPROVEMENTS 22 | 23 | - Support output 'this_k8s_node_ids' parameter. [GH-5]( https://github.com/terraform-alicloud-modules/terraform-alicloud-kubernetes/pull/5) 24 | 25 | ## 1.2.0 (Jun 16,2020) 26 | 27 | IMPROVEMENTS 28 | 29 | - Replace deprecation parameter add example. [GH-4]( https://github.com/terraform-alicloud-modules/terraform-alicloud-kubernetes/pull/4) 30 | 31 | ## 1.1.0 (Sep 24, 2019) 32 | 33 | IMPROVEMENTS 34 | 35 | - fix kubernetes module. [GH-2]( https://github.com/terraform-alicloud-modules/terraform-alicloud-kubernetes/pull/2) 36 | 37 | - imporve(kubernetes): update the module to the format of the new version. [GH-1]( https://github.com/terraform-alicloud-modules/terraform-alicloud-kubernetes/pull/1) 38 | -------------------------------------------------------------------------------- /examples/complete/main.tf: -------------------------------------------------------------------------------- 1 | 2 | data "alicloud_zones" "default" { 3 | available_resource_creation = "VSwitch" 4 | } 5 | 6 | resource "alicloud_vpc" "default" { 7 | vpc_name = "tf_module" 8 | cidr_block = "10.4.0.0/16" 9 | } 10 | 11 | resource "alicloud_vswitch" "default" { 12 | count = 3 13 | vpc_id = alicloud_vpc.default.id 14 | cidr_block = cidrsubnet(alicloud_vpc.default.cidr_block, 8, count.index) 15 | zone_id = data.alicloud_zones.default.zones[0].id 16 | } 17 | 18 | data "alicloud_instance_types" "cloud_essd" { 19 | availability_zone = data.alicloud_zones.default.zones[0].id 20 | cpu_core_count = 4 21 | memory_size = 8 22 | system_disk_category = "cloud_essd" 23 | } 24 | 25 | module "k8s" { 26 | source = "../.." 27 | 28 | new_nat_gateway = false 29 | vpc_id = alicloud_vpc.default.id 30 | vswitch_ids = alicloud_vswitch.default[*].id 31 | master_instance_types = [data.alicloud_instance_types.cloud_essd.instance_types[0].id, data.alicloud_instance_types.cloud_essd.instance_types[1].id, data.alicloud_instance_types.cloud_essd.instance_types[2].id] 32 | worker_instance_types = [data.alicloud_instance_types.cloud_essd.instance_types[0].id] 33 | k8s_pod_cidr = "10.72.0.0/16" 34 | k8s_service_cidr = "172.18.0.0/16" 35 | k8s_worker_number = 2 36 | 37 | data_disks = [{ 38 | category = "cloud_efficiency" 39 | size = 40 40 | }] 41 | } 42 | 43 | data "alicloud_cs_cluster_credential" "auth" { 44 | cluster_id = module.k8s.cluster_id[0] 45 | temporary_duration_minutes = 60 46 | output_file = "~/.kube/config" 47 | } -------------------------------------------------------------------------------- /scripts/curl_fc_trigger.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "crypto/rand" 5 | "encoding/json" 6 | "fmt" 7 | "io" 8 | "log" 9 | "math/big" 10 | "net/http" 11 | "os" 12 | "strings" 13 | ) 14 | 15 | var urlPrefix = "https://terraform-fc-test-for-example-module.oss-ap-southeast-1.aliyuncs.com" 16 | 17 | func main() { 18 | if len(os.Args)!=4{ 19 | log.Println("[ERROR] invalid args") 20 | return 21 | } 22 | branch := strings.TrimSpace(os.Args[1]) 23 | repoName := strings.TrimSpace(os.Args[2]) 24 | ossObjectPath := strings.TrimSpace(os.Args[3]) 25 | 26 | // get trigger url 27 | fcTriggerUrl := urlPrefix + "/fcUrls.json" 28 | response, err := http.Get(fcTriggerUrl) 29 | if err != nil { 30 | log.Println("[ERROR] get fc trigger url failed") 31 | } 32 | defer response.Body.Close() 33 | 34 | content, _ := io.ReadAll(response.Body) 35 | var data interface{} 36 | json.Unmarshal(content, &data) 37 | triggerMap := data.(map[string]interface{}) 38 | 39 | n, _ := rand.Int(rand.Reader, big.NewInt(100)) 40 | index := int(n.Int64()) % len(triggerMap) 41 | triggerUrl := triggerMap[fmt.Sprintf("%d", index)] 42 | fmt.Println(triggerUrl) 43 | 44 | // curl 45 | client := &http.Client{} 46 | req, err := http.NewRequest("GET", triggerUrl.(string), 47 | nil) 48 | if err != nil { 49 | panic(err) 50 | } 51 | req.Header.Add("X-Fc-Invocation-Type", "Async") 52 | 53 | query := req.URL.Query() 54 | query.Add("branch", branch) 55 | query.Add("repo_name", repoName) 56 | query.Add("oss_object_path", ossObjectPath) 57 | req.URL.RawQuery = query.Encode() 58 | 59 | if _, err := client.Do(req); err != nil { 60 | log.Printf("[ERROR] fail to trigger fc test, err: %s", err) 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /.github/workflows/weekly_e2e.yml: -------------------------------------------------------------------------------- 1 | name: Weekly E2E Test Check 2 | on: 3 | workflow_dispatch: 4 | schedule: 5 | - cron: '0 0 * * 0' 6 | 7 | jobs: 8 | weekly-e2e-check: 9 | if: github.repository_owner == 'alibabacloud-automation' 10 | name: 'weekly e2e check' 11 | runs-on: ubuntu-latest 12 | permissions: write-all 13 | steps: 14 | - name: checkout 15 | uses: actions/checkout@v3 16 | - name: set id 17 | id: set-job-id 18 | uses: ayachensiyuan/get-action-job-id@v1.6 19 | env: 20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 21 | with: 22 | job-name: 'weekly e2e check' 23 | - name: Get job id 24 | run: | 25 | echo "The current job id is ${{ steps.set-job-id.outputs.jobId }}" 26 | - name: Extract branch name 27 | shell: bash 28 | run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" 29 | id: extract_branch 30 | - name: weekly e2e test 31 | run: | 32 | objectPath="github-action/${{github.repository}}/weekly-e2e/Action-${{github.run_number}}-${{github.run_id}}-${{ steps.set-job-id.outputs.jobId }}" 33 | echo "default branch: ${{ steps.extract_branch.outputs.branch }}" 34 | go run scripts/curl_fc_trigger.go ${{ steps.extract_branch.outputs.branch }} ${{github.repository}} ${objectPath} 35 | go run scripts/e2e_check.go ${objectPath} 36 | - name: whether to upload test record 37 | id: whether-to-upload-test-record 38 | run: | 39 | REPO_NAME=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2) 40 | modules=$(curl -sL "https://terraform-fc-test-for-example-module.oss-ap-southeast-1.aliyuncs.com/testRecordReleased.json") 41 | if echo "$modules" | jq --arg key "$REPO_NAME" -re 'has($key)' | grep -q true; then 42 | echo "The key exists at the JSON object." 43 | echo "::set-output name=output_value::0" 44 | else 45 | echo "The key does not exist at the JSON object." 46 | echo "::set-output name=output_value::1" 47 | fi 48 | - name: update test record 49 | if: steps.whether-to-upload-test-record.outputs.output_value == 1 50 | run: | 51 | git add TestRecord.md 52 | cd .git 53 | sudo chmod -R a+rwX . 54 | sudo find . -type d -exec chmod g+s '{}' + 55 | - name: Commit & Push changes 56 | if: steps.whether-to-upload-test-record.outputs.output_value == 1 57 | uses: actions-js/push@master 58 | with: 59 | github_token: ${{ secrets.GITHUB_TOKEN }} 60 | message: 'Update TestRecord' 61 | branch: ${{ steps.extract_branch.outputs.branch }} -------------------------------------------------------------------------------- /scripts/terraform-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | version="" 4 | updateFolder="examples/complete" 5 | tfvars="tfvars/01-update.tfvars" 6 | f=${1} 7 | success=true 8 | # echo $f 9 | exitCode=0 10 | terraformVersionFile="tfversion.md" 11 | 12 | if [ $# -ge 2 ]; then 13 | echo "" > $terraformVersionFile 14 | fi 15 | 16 | echo "" 17 | echo "====> Terraform testing in" $f 18 | # init 19 | terraform -chdir=$f init -upgrade >/dev/null 20 | if [[ $? -ne 0 ]]; then 21 | success=false 22 | exitCode=1 23 | echo -e "\033[31m[ERROR]\033[0m: running terraform init failed." 24 | else 25 | # plan 26 | echo "" 27 | echo -e "----> Plan Testing\n" 28 | terraform -chdir=$f plan >/dev/null 29 | if [[ $? -ne 0 ]]; then 30 | success=false 31 | exitCode=2 32 | echo -e "\033[31m[ERROR]\033[0m: running terraform plan failed." 33 | else 34 | echo -e "\033[32m - plan check: success\033[0m" 35 | # apply 36 | echo "" 37 | echo -e "----> Apply Testing\n" 38 | terraform -chdir=$f apply -auto-approve >/dev/null 39 | if [[ $? -ne 0 ]]; then 40 | success=false 41 | exitCode=3 42 | echo -e "\033[31m[ERROR]\033[0m: running terraform apply failed." 43 | else 44 | echo -e "\033[32m - apply check: success\033[0m" 45 | # update & check diff 46 | if [ $f == $updateFolder ] && [ -f "${updateFolder}/${tfvars}" ];then 47 | # if example is complete and has tfvars folder 48 | echo "" 49 | echo -e " ----> Apply Update Testing\n" 50 | terraform -chdir=$f apply -auto-approve -var-file=$tfvars >/dev/null 51 | if [[ $? -ne 0 ]]; then 52 | success=false 53 | exitCode=3 54 | echo -e "\033[31m[ERROR]\033[0m: running terraform apply update failed." 55 | else 56 | echo -e "\033[32m - apply update check: success\033[0m" 57 | echo "" 58 | echo -e " ----> Apply Diff Checking\n" 59 | terraform -chdir=$f plan -var-file=$tfvars -detailed-exitcode 60 | if [[ $? -ne 0 ]]; then 61 | success=false 62 | if [[ $exitCode -eq 0 ]]; then 63 | exitCode=4 64 | fi 65 | echo -e "\033[31m[ERROR]\033[0m: running terraform plan for checking diff failed." 66 | else 67 | echo -e "\033[32m - apply diff check: success\033[0m" 68 | fi 69 | fi 70 | else 71 | # if example is no need to update 72 | echo "" 73 | echo -e " ----> Apply Diff Checking\n" 74 | terraform -chdir=$f plan -detailed-exitcode 75 | if [[ $? -ne 0 ]]; then 76 | success=false 77 | exitCode=4 78 | echo -e "\033[31m[ERROR]\033[0m: running terraform plan for checking diff failed." 79 | else 80 | echo -e "\033[32m - apply diff check: success\033[0m" 81 | fi 82 | fi 83 | fi 84 | # destroy 85 | echo "" 86 | echo -e " ----> Destroying\n" 87 | terraform -chdir=$f destroy -auto-approve >/dev/null 88 | if [[ $? -ne 0 ]]; then 89 | success=false 90 | if [[ $exitCode -eq 0 ]]; then 91 | exitCode=5 92 | fi 93 | echo -e "\033[31m[ERROR]\033[0m: running terraform destroy failed." 94 | else 95 | echo -e "\033[32m - destroy: success\033[0m" 96 | fi 97 | fi 98 | fi 99 | 100 | version=$(terraform -chdir=$f version) 101 | row=`echo -e "$version" | sed -n '/^$/='` 102 | if [ -n "$row" ]; then 103 | version=`echo -e "$version" | sed -n "1,${row}p"` 104 | fi 105 | 106 | if [[ $exitCode -ne 1 ]]; then 107 | rm -rf $f/.terraform 108 | rm -rf $f/.terraform.lock.hcl 109 | fi 110 | 111 | if [ $# -ge 2 ]; then 112 | echo -e "### Versions\n" >> $terraformVersionFile 113 | echo -e "${version}" >> $terraformVersionFile 114 | fi 115 | 116 | exit $exitCode -------------------------------------------------------------------------------- /scripts/e2e_check.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "log" 7 | "net/http" 8 | "os" 9 | "strings" 10 | "time" 11 | ) 12 | 13 | var urlPrefix = "https://terraform-fc-test-for-example-module.oss-ap-southeast-1.aliyuncs.com" 14 | 15 | func main() { 16 | ossObjectPath := strings.TrimSpace(os.Args[1]) 17 | log.Println("run log path:", ossObjectPath) 18 | runLogFileName := "terraform.run.log" 19 | runResultFileName := "terraform.run.result.log" 20 | runLogUrl := urlPrefix + "/" + ossObjectPath + "/" + runLogFileName 21 | runResultUrl := urlPrefix + "/" + ossObjectPath + "/" + runResultFileName 22 | lastLineNum := 0 23 | deadline := time.Now().Add(time.Duration(24) * time.Hour) 24 | finish := false 25 | exitCode := 0 26 | log.Println(runLogUrl) 27 | errResultMessage := "" 28 | for !time.Now().After(deadline) { 29 | runLogResponse, err := http.Get(runLogUrl) 30 | if err != nil || runLogResponse.StatusCode != 200 { 31 | log.Println("waiting for job running...") 32 | time.Sleep(5 * time.Second) 33 | continue 34 | } 35 | defer runLogResponse.Body.Close() 36 | 37 | s, er := io.ReadAll(runLogResponse.Body) 38 | if er != nil && fmt.Sprint(er) != "EOF" { 39 | log.Println("[ERROR] reading run log response failed:", err) 40 | } 41 | lineNum := len(s) 42 | if runLogResponse.StatusCode == 200 { 43 | if lineNum > lastLineNum { 44 | fmt.Printf("%s", s[lastLineNum:lineNum]) 45 | lastLineNum = lineNum 46 | } 47 | } 48 | if finish { 49 | log.Println("run log path:", ossObjectPath) 50 | log.Println("run log url:", runLogUrl) 51 | if strings.Contains(ossObjectPath, "weekly") { 52 | updateTestRecord(ossObjectPath) 53 | exitCode = 0 54 | } 55 | if errResultMessage != "" { 56 | log.Println("[ERROR] run result:", errResultMessage) 57 | } 58 | os.Exit(exitCode) 59 | } 60 | runResultResponse, err := http.Get(runResultUrl) 61 | if err != nil || runResultResponse.StatusCode != 200 { 62 | time.Sleep(5 * time.Second) 63 | continue 64 | } 65 | defer runResultResponse.Body.Close() 66 | runResultContent := make([]byte, 100000) 67 | _, err = runResultResponse.Body.Read(runResultContent) 68 | if err != nil && fmt.Sprint(err) != "EOF" { 69 | log.Println("[ERROR] reading run result response failed:", err) 70 | } 71 | finish = true 72 | if !strings.HasPrefix(string(runResultContent), "PASS") { 73 | errResultMessage = string(runResultContent) 74 | exitCode = 1 75 | } 76 | } 77 | log.Println("[ERROR] Timeout: waiting for job finished timeout after 24 hours.") 78 | } 79 | 80 | func updateTestRecord(ossObjectPath string) { 81 | currentTestRecordFileName := "TestRecord.md" 82 | currentTestRecordFileUrl := urlPrefix + "/" + ossObjectPath + "/" + currentTestRecordFileName 83 | response, err := http.Get(currentTestRecordFileUrl) 84 | if err != nil { 85 | log.Println("[ERROR] failed to get test record from oss") 86 | return 87 | } 88 | defer response.Body.Close() 89 | data, _ := io.ReadAll(response.Body) 90 | if response.StatusCode != 200 || len(data) == 0 { 91 | return 92 | } 93 | currentTestRecord := string(data) + "\n" 94 | 95 | testRecordFileName := "TestRecord.md" 96 | var testRecordFile *os.File 97 | oldTestRecord := "" 98 | if _, err := os.Stat(testRecordFileName); os.IsNotExist(err) { 99 | testRecordFile, err = os.Create(testRecordFileName) 100 | if err != nil { 101 | log.Println("[ERROR] failed to create test record file") 102 | } 103 | } else { 104 | data, err := os.ReadFile(testRecordFileName) 105 | if err != nil { 106 | log.Println("[ERROR] failed to read test record file") 107 | return 108 | } 109 | oldTestRecord = string(data) 110 | 111 | testRecordFile, err = os.OpenFile(testRecordFileName, os.O_TRUNC|os.O_RDWR, 0666) 112 | if err != nil { 113 | log.Println("[ERROR] failed to open test record file") 114 | } 115 | } 116 | defer testRecordFile.Close() 117 | 118 | currentTestRecord += oldTestRecord 119 | testRecordFile.WriteString(currentTestRecord) 120 | } 121 | -------------------------------------------------------------------------------- /.github/workflows/e2e.yml: -------------------------------------------------------------------------------- 1 | name: E2E Test Check 2 | on: 3 | pull_request: 4 | branches: 5 | - master 6 | - main 7 | types: [ 'opened', 'synchronize' ] 8 | 9 | jobs: 10 | commitlint: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: ahmadnassri/action-commit-lint@v2 14 | 15 | changes-files: 16 | runs-on: ubuntu-latest 17 | outputs: 18 | changed_files_list: ${{ steps.changed-files.outputs.all_changed_files }} 19 | steps: 20 | - uses: actions/checkout@v4 21 | - name: Get changed files 22 | id: changed-files 23 | uses: tj-actions/changed-files@v34 24 | with: 25 | separator: "," 26 | 27 | terraform-fmt: 28 | runs-on: ubuntu-latest 29 | needs: changes-files 30 | if: contains(needs.changes-files.outputs.changed_files_list, '.tf') 31 | steps: 32 | - uses: actions/checkout@v4 33 | - uses: hashicorp/setup-terraform@v3 34 | - name: Terraform fmt 35 | id: fmt 36 | run: terraform fmt -check -recursive 37 | 38 | terraform-validate: 39 | runs-on: ubuntu-latest 40 | needs: changes-files 41 | if: contains(needs.changes-files.outputs.changed_files_list, '.tf') 42 | steps: 43 | - name: checkout 44 | uses: actions/checkout@v3 45 | - uses: hashicorp/setup-terraform@v3 46 | - name: validate-check 47 | run: | 48 | exp="examples" 49 | output_file="combined_output.txt" 50 | if [[ -d "$exp" ]]; then 51 | find $exp -type d -print -mindepth 1 -maxdepth 1 >> $output_file 52 | fi 53 | 54 | exitCode=0 55 | while IFS= read -r line 56 | do 57 | echo "===> Terraform validate checking in $line" 58 | terraform -chdir=$line init -upgrade 59 | terraform -chdir=$line validate 60 | if [[ $? -ne 0 ]]; then 61 | echo -e "\033[31m[ERROR]\033[0m: Some codes contain errors, and please running terraform validate command before pushing." 62 | exitCode=1 63 | fi 64 | done < $output_file 65 | rm $output_file 66 | exit $exitCode 67 | 68 | tflint: 69 | runs-on: ubuntu-latest 70 | needs: changes-files 71 | if: contains(needs.changes-files.outputs.changed_files_list, '.tf') 72 | steps: 73 | - name: checkout 74 | uses: actions/checkout@v3 75 | 76 | - uses: actions/checkout@v4 77 | name: Checkout source code 78 | 79 | - uses: actions/cache@v4 80 | name: Cache plugin dir 81 | with: 82 | path: ~/.tflint.d/plugins 83 | key: ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }} 84 | 85 | - uses: terraform-linters/setup-tflint@v4 86 | name: Setup TFLint 87 | with: 88 | tflint_version: v0.52.0 89 | 90 | - name: Init TFLint 91 | run: tflint --init 92 | env: 93 | GITHUB_TOKEN: ${{ github.token }} 94 | 95 | - name: tflint 96 | run: | 97 | tflint --recursive \ 98 | --enable-rule=terraform_comment_syntax \ 99 | --enable-rule=terraform_deprecated_index \ 100 | --enable-rule=terraform_deprecated_interpolation \ 101 | --enable-rule=terraform_deprecated_lookup \ 102 | --enable-rule=terraform_documented_outputs \ 103 | --enable-rule=terraform_documented_variables \ 104 | --enable-rule=terraform_typed_variables \ 105 | --enable-rule=terraform_unused_declarations \ 106 | --enable-rule=terraform_required_version \ 107 | --enable-rule=terraform_standard_module_structure \ 108 | --disable-rule=terraform_required_providers 109 | if [[ $? -ne 0 ]]; then 110 | exit_code=1 111 | fi 112 | 113 | e2e-check: 114 | needs: [commitlint, terraform-fmt, terraform-validate, tflint] 115 | runs-on: ubuntu-latest 116 | name: 'e2e check' 117 | steps: 118 | - name: checkout 119 | uses: actions/checkout@v3 120 | - name: set id 121 | id: set-job-id 122 | uses: ayachensiyuan/get-action-job-id@v1.6 123 | env: 124 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 125 | with: 126 | job-name: 'e2e check' 127 | - name: Get pull request info 128 | run: | 129 | echo "repo name is" ${{github.event.pull_request.head.repo.full_name}} 130 | echo "branch is" ${{github.event.pull_request.head.ref}} 131 | echo "The current job id is ${{ steps.set-job-id.outputs.jobId }}" 132 | - name: e2e test 133 | run: | 134 | objectPath="github-action/${{github.repository}}/e2e/Action-${{github.run_number}}-${{github.run_id}}-${{ steps.set-job-id.outputs.jobId }}" 135 | go run scripts/curl_fc_trigger.go ${{github.event.pull_request.head.ref}} ${{github.event.pull_request.head.repo.full_name}} ${objectPath} 136 | go run scripts/e2e_check.go ${objectPath} -------------------------------------------------------------------------------- /main.tf: -------------------------------------------------------------------------------- 1 | # Instance_types data source for instance_type 2 | data "alicloud_instance_types" "default" { 3 | cpu_core_count = var.cpu_core_count 4 | memory_size = var.memory_size 5 | } 6 | 7 | # Zones data source for availability_zone 8 | data "alicloud_zones" "default" { 9 | available_instance_type = data.alicloud_instance_types.default.instance_types[0].id 10 | } 11 | 12 | # If there is not specifying vpc_id, the module will launch a new vpc 13 | resource "alicloud_vpc" "vpc" { 14 | count = var.create_vpc ? 1 : 0 15 | cidr_block = var.vpc_cidr 16 | vpc_name = var.vpc_name == "" ? var.example_name : var.vpc_name 17 | } 18 | 19 | # According to the vswitch cidr blocks to launch several vswitches 20 | resource "alicloud_vswitch" "vswitches" { 21 | count = length(var.vswitch_ids) > 0 ? 0 : length(var.vswitch_cidrs) 22 | vpc_id = var.vpc_id == "" ? join("", alicloud_vpc.vpc[*].id) : var.vpc_id 23 | cidr_block = var.vswitch_cidrs[count.index] 24 | zone_id = data.alicloud_zones.default.zones[count.index % length(data.alicloud_zones.default.zones)]["id"] 25 | vswitch_name = var.vswitch_name_prefix == "" ? format( 26 | "%s-%s", 27 | var.example_name, 28 | format(var.number_format, count.index + 1), 29 | ) : format( 30 | "%s-%s", 31 | var.vswitch_name_prefix, 32 | format(var.number_format, count.index + 1), 33 | ) 34 | } 35 | 36 | resource "alicloud_nat_gateway" "default" { 37 | count = var.new_nat_gateway == true ? 1 : 0 38 | vpc_id = var.vpc_id == "" ? join("", alicloud_vpc.vpc[*].id) : var.vpc_id 39 | nat_gateway_name = var.example_name 40 | } 41 | 42 | resource "alicloud_eip" "default" { 43 | count = var.new_nat_gateway == true ? 1 : 0 44 | bandwidth = 10 45 | } 46 | 47 | resource "alicloud_eip_association" "default" { 48 | count = var.new_nat_gateway == true ? 1 : 0 49 | allocation_id = alicloud_eip.default[0].id 50 | instance_id = alicloud_nat_gateway.default[0].id 51 | } 52 | 53 | resource "alicloud_snat_entry" "default" { 54 | count = var.new_nat_gateway == false ? 0 : length(var.vswitch_ids) > 0 ? length(var.vswitch_ids) : length(var.vswitch_cidrs) 55 | snat_table_id = alicloud_nat_gateway.default[0].snat_table_ids 56 | source_vswitch_id = length(var.vswitch_ids) > 0 ? split(",", join(",", var.vswitch_ids))[count.index % length(split(",", join(",", var.vswitch_ids)))] : length(var.vswitch_cidrs) < 1 ? "" : split(",", join(",", alicloud_vswitch.vswitches[*].id))[count.index % length(split(",", join(",", alicloud_vswitch.vswitches[*].id)))] 57 | snat_ip = alicloud_eip.default[0].ip_address 58 | depends_on = [alicloud_eip_association.default] 59 | } 60 | 61 | resource "alicloud_cs_kubernetes" "k8s" { 62 | count = var.k8s_number 63 | 64 | name = var.k8s_name_prefix == "" ? format( 65 | "%s-%s", 66 | var.example_name, 67 | format(var.number_format, count.index + 1), 68 | ) : format( 69 | "%s-%s", 70 | var.k8s_name_prefix, 71 | format(var.number_format, count.index + 1), 72 | ) 73 | master_vswitch_ids = length(var.vswitch_ids) > 0 ? split(",", join(",", var.vswitch_ids)) : length(var.vswitch_cidrs) < 1 ? [] : split(",", join(",", alicloud_vswitch.vswitches[*].id)) 74 | master_instance_types = var.master_instance_types 75 | node_cidr_mask = var.node_cidr_mask 76 | enable_ssh = var.enable_ssh 77 | install_cloud_monitor = var.install_cloud_monitor 78 | proxy_mode = var.proxy_mode 79 | password = var.master_password 80 | pod_cidr = var.k8s_pod_cidr 81 | service_cidr = var.k8s_service_cidr 82 | version = var.k8s_version 83 | dynamic "addons" { 84 | for_each = var.cluster_addons 85 | content { 86 | name = lookup(addons.value, "name", var.cluster_addons) 87 | config = lookup(addons.value, "config", var.cluster_addons) 88 | } 89 | } 90 | depends_on = [alicloud_snat_entry.default] 91 | } 92 | 93 | resource "alicloud_cs_kubernetes_node_pool" "default" { 94 | count = var.k8s_number 95 | 96 | name = alicloud_cs_kubernetes.k8s[count.index].name 97 | cluster_id = alicloud_cs_kubernetes.k8s[count.index].id 98 | vswitch_ids = length(var.vswitch_ids) > 0 ? split(",", join(",", var.vswitch_ids)) : length(var.vswitch_cidrs) < 1 ? [] : split(",", join(",", alicloud_vswitch.vswitches[*].id)) 99 | password = var.worker_password[count.index] 100 | 101 | desired_size = var.k8s_worker_number 102 | install_cloud_monitor = var.install_cloud_monitor 103 | instance_types = var.worker_instance_types 104 | 105 | instance_charge_type = var.instance_charge_type 106 | period = lookup(local.subscription, "period", null) 107 | period_unit = lookup(local.subscription, "period_unit", null) 108 | auto_renew = lookup(local.subscription, "auto_renew", null) 109 | auto_renew_period = lookup(local.subscription, "auto_renew_period", null) 110 | 111 | cpu_policy = var.cpu_policy 112 | system_disk_category = var.system_disk_category 113 | system_disk_size = var.system_disk_size 114 | 115 | dynamic "data_disks" { 116 | for_each = var.data_disks 117 | content { 118 | name = lookup(data_disks.value, "name", null) 119 | size = lookup(data_disks.value, "size", null) 120 | category = lookup(data_disks.value, "category", null) 121 | encrypted = lookup(data_disks.value, "encrypted", null) 122 | performance_level = lookup(data_disks.value, "encperformance_levelrypted", null) 123 | snapshot_id = lookup(data_disks.value, "snapshot_id", null) 124 | device = lookup(data_disks.value, "device", null) 125 | kms_key_id = lookup(data_disks.value, "kms_key_id", null) 126 | auto_snapshot_policy_id = lookup(data_disks.value, "auto_snapshot_policy_id", null) 127 | 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /variables.tf: -------------------------------------------------------------------------------- 1 | 2 | ###################### 3 | # Instance typs variables 4 | ###################### 5 | variable "cpu_core_count" { 6 | description = "CPU core count is used to fetch instance types." 7 | type = number 8 | default = 1 9 | } 10 | 11 | variable "memory_size" { 12 | description = "Memory size used to fetch instance types." 13 | type = number 14 | default = 2 15 | } 16 | 17 | variable "k8s_number" { 18 | description = "The number of kubernetes cluster." 19 | type = number 20 | default = 1 21 | } 22 | 23 | ###################### 24 | # VPC variables 25 | ###################### 26 | variable "vpc_name" { 27 | description = "The vpc name used to create a new vpc when 'vpc_id' is not specified. Default to variable `example_name`" 28 | type = string 29 | default = "" 30 | } 31 | 32 | variable "create_vpc" { 33 | description = "Boolean. If you have a vpc already, use that one, else make this true and one will be created." 34 | type = bool 35 | default = false 36 | } 37 | 38 | variable "vpc_id" { 39 | description = "Existing vpc id used to create several vswitches and other resources." 40 | type = string 41 | default = "" 42 | } 43 | 44 | variable "example_name" { 45 | description = "The name as prefix used to create resources." 46 | type = string 47 | default = "tf-example-kubernetes" 48 | } 49 | 50 | variable "vpc_cidr" { 51 | description = "The cidr block used to launch a new vpc when 'vpc_id' is not specified." 52 | type = string 53 | default = "10.0.0.0/8" 54 | } 55 | 56 | ###################### 57 | # VSwitch variables 58 | ###################### 59 | variable "vswitch_name_prefix" { 60 | type = string 61 | description = "The vswitch name prefix used to create several new vswitches. Default to variable 'example_name'." 62 | default = "" 63 | } 64 | 65 | variable "number_format" { 66 | description = "The number format used to output." 67 | type = string 68 | default = "%02d" 69 | } 70 | 71 | variable "vswitch_ids" { 72 | description = "List of existing vswitch id." 73 | type = list(string) 74 | default = [] 75 | } 76 | 77 | variable "vswitch_cidrs" { 78 | description = "List of cidr blocks used to create several new vswitches when 'vswitch_ids' is not specified." 79 | type = list(string) 80 | default = ["10.1.0.0/16", "10.2.0.0/16", "10.3.0.0/16"] 81 | } 82 | 83 | variable "k8s_name_prefix" { 84 | description = "The name prefix used to create several kubernetes clusters. Default to variable `example_name`" 85 | type = string 86 | default = "" 87 | } 88 | 89 | variable "new_nat_gateway" { 90 | type = bool 91 | description = "Whether to create a new nat gateway. In this template, a new nat gateway will create a nat gateway, eip and server snat entries." 92 | default = true 93 | } 94 | 95 | variable "master_instance_types" { 96 | description = "The ecs instance types used to launch master nodes." 97 | type = list(string) 98 | default = [] 99 | } 100 | 101 | variable "worker_instance_types" { 102 | description = "The ecs instance types used to launch worker nodes." 103 | type = list(string) 104 | default = [] 105 | } 106 | 107 | variable "node_cidr_mask" { 108 | type = number 109 | description = "The node cidr block to specific how many pods can run on single node. Valid values: [24-28]." 110 | default = 24 111 | } 112 | 113 | variable "enable_ssh" { 114 | description = "Enable login to the node through SSH." 115 | type = bool 116 | default = false 117 | } 118 | 119 | variable "cpu_policy" { 120 | type = string 121 | description = "kubelet cpu policy. Valid values: 'none','static'. Default to 'none'." 122 | default = "none" 123 | } 124 | 125 | variable "proxy_mode" { 126 | description = "Proxy mode is option of kube-proxy. Valid values: 'ipvs','iptables'. Default to 'iptables'." 127 | type = string 128 | default = "iptables" 129 | } 130 | 131 | variable "master_password" { 132 | description = "The password of master ECS instance." 133 | type = string 134 | default = "Just4Test" 135 | } 136 | 137 | variable "k8s_worker_number" { 138 | description = "The number of worker nodes in kubernetes cluster." 139 | type = number 140 | default = 2 141 | } 142 | 143 | # k8s_pod_cidr is only for flannel network 144 | variable "k8s_pod_cidr" { 145 | description = "The kubernetes pod cidr block. It cannot be equals to vpc's or vswitch's and cannot be in them." 146 | type = string 147 | default = "172.20.0.0/16" 148 | } 149 | 150 | variable "k8s_service_cidr" { 151 | description = "The kubernetes service cidr block. It cannot be equals to vpc's or vswitch's or pod's and cannot be in them." 152 | type = string 153 | default = "172.21.0.0/20" 154 | } 155 | 156 | variable "k8s_version" { 157 | description = "The version of the kubernetes version." 158 | type = string 159 | default = "" 160 | } 161 | 162 | variable "cluster_addons" { 163 | description = "Addon components in kubernetes cluster" 164 | type = list(object({ 165 | name = string 166 | config = string 167 | })) 168 | default = [] 169 | } 170 | 171 | ###################### 172 | # node pool variables 173 | ###################### 174 | 175 | variable "worker_password" { 176 | description = "The password of worker ECS instance." 177 | type = list(string) 178 | default = ["Just4Test"] 179 | } 180 | 181 | variable "install_cloud_monitor" { 182 | description = "Install cloud monitor agent on ECS." 183 | type = bool 184 | default = true 185 | } 186 | 187 | variable "instance_charge_type" { 188 | description = "The charge type of instance. Choices are 'PostPaid' and 'PrePaid'." 189 | type = string 190 | default = "PostPaid" 191 | } 192 | 193 | variable "subscription" { 194 | description = "A mapping of fields for Prepaid ECS instances created. " 195 | type = map(string) 196 | default = { 197 | period = 1 198 | period_unit = "Month" 199 | auto_renew = false 200 | auto_renew_period = 1 201 | } 202 | } 203 | 204 | variable "system_disk_category" { 205 | description = "The system disk category used to launch one or more worker ecs instances." 206 | type = string 207 | default = "cloud_efficiency" 208 | } 209 | 210 | variable "system_disk_size" { 211 | description = "The system disk size used to launch one or more worker ecs instances." 212 | type = number 213 | default = 40 214 | } 215 | 216 | variable "data_disks" { 217 | description = "Additional data disks to attach to the scaled ECS instance." 218 | type = list(map(string)) 219 | default = [] 220 | } 221 | 222 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Alibaba Cloud terraform example for kubernetes cluster 2 | ====================================================== 3 | 4 | A terraform example to launching a kubernetes cluster in alibaba cloud. 5 | 6 | These types of the module resource are supported: 7 | 8 | - [VPC](https://www.terraform.io/docs/providers/alicloud/r/vpc.html) 9 | - [Subnet](https://www.terraform.io/docs/providers/alicloud/r/vswitch.html) 10 | - [ECS Instance](https://www.terraform.io/docs/providers/alicloud/r/instance.html) 11 | - [Security Group](https://www.terraform.io/docs/providers/alicloud/r/security_group.html) 12 | - [Nat Gateway](https://www.terraform.io/docs/providers/alicloud/r/nat_gateway.html) 13 | - [Kubernetes](https://www.terraform.io/docs/providers/alicloud/r/cs_kubernetes.html) 14 | 15 | Usage 16 | ----- 17 | This example can specify the following arguments to create user-defined kuberntes cluster 18 | 19 | * alicloud_access_key: The Alicloud Access Key ID 20 | * alicloud_secret_key: The Alicloud Access Secret Key 21 | * region: The ID of region in which launching resources 22 | * k8s_name_prefix: The name prefix of kubernetes cluster 23 | * k8s_number: The number of kubernetes cluster 24 | * k8s_worker_number: The number of worker nodes in each kubernetes cluster 25 | * k8s_pod_cidr: The kubernetes pod cidr block. It cannot be equals to vpc's or vswitch's and cannot be in them. If vpc's cidr block is `172.16.XX.XX/XX`, 26 | it had better to `192.168.XX.XX/XX` or `10.XX.XX.XX/XX` 27 | * k8s_service_cidr: The kubernetes service cidr block. Its setting rule is same as `k8s_pod_cidr` 28 | * Other kubernetes cluster arguments 29 | 30 | **Note:** In order to avoid some needless error, you had better to set `new_nat_gateway` to `true`. 31 | Otherwise, you must you must ensure you specified vswitches can access internet before running the example. 32 | 33 | Planning phase 34 | 35 | terraform plan 36 | 37 | Apply phase 38 | 39 | terraform apply 40 | 41 | 42 | Destroy 43 | 44 | terraform destroy 45 | 46 | 47 | Conditional creation 48 | -------------------- 49 | This example can support the following creating kubernetes cluster scenario by setting different arguments. 50 | 51 | ### 1. Create a new vpc, vswitches and nat gateway for the cluster. 52 | 53 | You can specify the following user-defined arguments: 54 | 55 | * vpc_name: A new vpc name 56 | * vpc_cidr: A new vpc cidr block 57 | * vswitch_name_prefix: The name prefix of several vswitches 58 | * vswitch_cidrs: List of cidr blocks for several new vswitches 59 | 60 | ```hcl 61 | variable "profile" { 62 | default = "default" 63 | } 64 | 65 | variable "region" { 66 | default = "cn-hangzhou" 67 | } 68 | 69 | data "alicloud_vpcs" "default" { 70 | is_default = true 71 | } 72 | 73 | module "k8s" { 74 | source = "../" 75 | 76 | new_nat_gateway = true 77 | vpc_name = "tf-k8s-vpc" 78 | vpc_cidr = "10.0.0.0/8" 79 | vswitch_name_prefix = "tf-k8s-vsw" 80 | vswitch_cidrs = ["10.1.0.0/16", "10.2.0.0/16", "10.3.0.0/16"] 81 | master_instance_types = ["ecs.n1.medium", "ecs.c5.large", "ecs.n1.medium"] 82 | worker_instance_types = ["ecs.n1.medium"] 83 | k8s_pod_cidr = "192.168.5.0/24" 84 | k8s_service_cidr = "192.168.2.0/24" 85 | k8s_worker_number = 2 86 | } 87 | ``` 88 | 89 | ### 2. Using existing vpc and vswitches for the cluster. 90 | 91 | You can specify the following user-defined arguments: 92 | 93 | * vpc_id: A existing vpc ID 94 | * vswitch_ids: List of IDs for several existing vswitches 95 | 96 | ```hcl 97 | variable "profile" { 98 | default = "default" 99 | } 100 | 101 | variable "region" { 102 | default = "cn-hangzhou" 103 | } 104 | 105 | data "alicloud_vpcs" "default" { 106 | is_default = true 107 | } 108 | 109 | module "k8s" { 110 | source = "../" 111 | 112 | vpc_id = data.alicloud_vpcs.default.vpcs.0.id 113 | vswitch_ids = ["vsw-bp1pog8voc3f42arr****", "vsw-bp1jxetj1386gqssg****", "vsw-bp1s1835sq5tjss9s****"] 114 | master_instance_types = ["ecs.n1.medium", "ecs.c5.large", "ecs.n1.medium"] 115 | worker_instance_types = ["ecs.n1.medium"] 116 | k8s_pod_cidr = "192.168.5.0/24" 117 | k8s_service_cidr = "192.168.2.0/24" 118 | k8s_worker_number = 2 119 | } 120 | ``` 121 | 122 | ### 3. Using existing vpc, vswitches and nat gateway for the cluster. 123 | 124 | You can specify the following user-defined arguments: 125 | 126 | * vpc_id: A existing vpc ID 127 | * vswitch_ids: List of IDs for several existing vswitches 128 | * new_nat_gateway: Set it to false. But you must ensure you specified vswitches can access internet. 129 | In other words, you must set snat entry for each vswitch before running the example. 130 | 131 | ```hcl 132 | variable "profile" { 133 | default = "default" 134 | } 135 | 136 | variable "region" { 137 | default = "cn-hangzhou" 138 | } 139 | 140 | data "alicloud_vpcs" "default" { 141 | is_default = true 142 | } 143 | 144 | module "k8s" { 145 | source = "../" 146 | 147 | new_nat_gateway = false 148 | vpc_id = data.alicloud_vpcs.default.vpcs.0.id 149 | vswitch_ids = ["vsw-bp1pog8voc3f42arr****", "vsw-bp1jxetj1386gqssg****", "vsw-bp1s1835sq5tjss9s****"] 150 | master_instance_types = ["ecs.n1.medium", "ecs.c5.large", "ecs.n1.medium"] 151 | worker_instance_types = ["ecs.n1.medium"] 152 | k8s_pod_cidr = "192.168.5.0/24" 153 | k8s_service_cidr = "192.168.2.0/24" 154 | k8s_worker_number = 2 155 | } 156 | ``` 157 | 158 | ## Examples 159 | 160 | * [complete example](https://github.com/terraform-alicloud-modules/terraform-alicloud-kubernetes/tree/master/examples/complete) 161 | 162 | ## Notes 163 | From the version v1.4.0, the module has removed the following `provider` setting: 164 | 165 | ```hcl 166 | provider "alicloud" { 167 | profile = var.profile != "" ? var.profile : null 168 | shared_credentials_file = var.shared_credentials_file != "" ? var.shared_credentials_file : null 169 | region = var.region 170 | skip_region_validation = var.skip_region_validation 171 | configuration_source = "terraform-alicloud-modules/kubernetes" 172 | } 173 | ``` 174 | 175 | If you still want to use the `provider` setting to apply this module, you can specify a supported version, like 1.3.0: 176 | 177 | ```hcl 178 | module "k8s" { 179 | source = "terraform-alicloud-modules/kubernetes/alicloud" 180 | version = "1.3.0" 181 | region = "cn-hangzhou" 182 | profile = "Your-Profile-Name" 183 | new_nat_gateway = true 184 | vpc_name = "tf-k8s-vpc" 185 | // ... 186 | } 187 | ``` 188 | 189 | If you want to upgrade the module to 1.4.0 or higher in-place, you can define a provider which same region with 190 | previous region: 191 | 192 | ```hcl 193 | provider "alicloud" { 194 | region = "cn-hangzhou" 195 | profile = "Your-Profile-Name" 196 | } 197 | module "k8s" { 198 | source = "terraform-alicloud-modules/kubernetes/alicloud" 199 | new_nat_gateway = true 200 | vpc_name = "tf-k8s-vpc" 201 | // ... 202 | } 203 | ``` 204 | or specify an alias provider with a defined region to the module using `providers`: 205 | 206 | ```hcl 207 | provider "alicloud" { 208 | region = "cn-hangzhou" 209 | profile = "Your-Profile-Name" 210 | alias = "hz" 211 | } 212 | module "k8s" { 213 | source = "terraform-alicloud-modules/kubernetes/alicloud" 214 | providers = { 215 | alicloud = alicloud.hz 216 | } 217 | new_nat_gateway = true 218 | vpc_name = "tf-k8s-vpc" 219 | // ... 220 | } 221 | ``` 222 | 223 | and then run `terraform init` and `terraform apply` to make the defined provider effect to the existing module state. 224 | 225 | More details see [How to use provider in the module](https://www.terraform.io/docs/language/modules/develop/providers.html#passing-providers-explicitly) 226 | 227 | 228 | ## Requirements 229 | 230 | | Name | Version | 231 | |------|---------| 232 | | [terraform](#requirement\_terraform) | >= 0.13 | 233 | 234 | ## Providers 235 | 236 | | Name | Version | 237 | |------|---------| 238 | | [alicloud](#provider\_alicloud) | n/a | 239 | 240 | ## Modules 241 | 242 | No modules. 243 | 244 | ## Resources 245 | 246 | | Name | Type | 247 | |------|------| 248 | | [alicloud_cs_kubernetes.k8s](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/resources/cs_kubernetes) | resource | 249 | | [alicloud_cs_kubernetes_node_pool.default](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/resources/cs_kubernetes_node_pool) | resource | 250 | | [alicloud_eip.default](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/resources/eip) | resource | 251 | | [alicloud_eip_association.default](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/resources/eip_association) | resource | 252 | | [alicloud_nat_gateway.default](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/resources/nat_gateway) | resource | 253 | | [alicloud_snat_entry.default](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/resources/snat_entry) | resource | 254 | | [alicloud_vpc.vpc](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/resources/vpc) | resource | 255 | | [alicloud_vswitch.vswitches](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/resources/vswitch) | resource | 256 | | [alicloud_instance_types.default](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/data-sources/instance_types) | data source | 257 | | [alicloud_zones.default](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/data-sources/zones) | data source | 258 | 259 | ## Inputs 260 | 261 | | Name | Description | Type | Default | Required | 262 | |------|-------------|------|---------|:--------:| 263 | | [cluster\_addons](#input\_cluster\_addons) | Addon components in kubernetes cluster |
list(object({
name = string
config = string
})) | `[]` | no |
264 | | [cpu\_core\_count](#input\_cpu\_core\_count) | CPU core count is used to fetch instance types. | `number` | `1` | no |
265 | | [cpu\_policy](#input\_cpu\_policy) | kubelet cpu policy. Valid values: 'none','static'. Default to 'none'. | `string` | `"none"` | no |
266 | | [create\_vpc](#input\_create\_vpc) | Boolean. If you have a vpc already, use that one, else make this true and one will be created. | `bool` | `false` | no |
267 | | [data\_disks](#input\_data\_disks) | Additional data disks to attach to the scaled ECS instance. | `list(map(string))` | `[]` | no |
268 | | [enable\_ssh](#input\_enable\_ssh) | Enable login to the node through SSH. | `bool` | `false` | no |
269 | | [example\_name](#input\_example\_name) | The name as prefix used to create resources. | `string` | `"tf-example-kubernetes"` | no |
270 | | [install\_cloud\_monitor](#input\_install\_cloud\_monitor) | Install cloud monitor agent on ECS. | `bool` | `true` | no |
271 | | [instance\_charge\_type](#input\_instance\_charge\_type) | The charge type of instance. Choices are 'PostPaid' and 'PrePaid'. | `string` | `"PostPaid"` | no |
272 | | [k8s\_name\_prefix](#input\_k8s\_name\_prefix) | The name prefix used to create several kubernetes clusters. Default to variable `example_name` | `string` | `""` | no |
273 | | [k8s\_number](#input\_k8s\_number) | The number of kubernetes cluster. | `number` | `1` | no |
274 | | [k8s\_pod\_cidr](#input\_k8s\_pod\_cidr) | The kubernetes pod cidr block. It cannot be equals to vpc's or vswitch's and cannot be in them. | `string` | `"172.20.0.0/16"` | no |
275 | | [k8s\_service\_cidr](#input\_k8s\_service\_cidr) | The kubernetes service cidr block. It cannot be equals to vpc's or vswitch's or pod's and cannot be in them. | `string` | `"172.21.0.0/20"` | no |
276 | | [k8s\_version](#input\_k8s\_version) | The version of the kubernetes version. | `string` | `""` | no |
277 | | [k8s\_worker\_number](#input\_k8s\_worker\_number) | The number of worker nodes in kubernetes cluster. | `number` | `2` | no |
278 | | [master\_instance\_types](#input\_master\_instance\_types) | The ecs instance types used to launch master nodes. | `list(string)` | `[]` | no |
279 | | [master\_password](#input\_master\_password) | The password of master ECS instance. | `string` | `"Just4Test"` | no |
280 | | [memory\_size](#input\_memory\_size) | Memory size used to fetch instance types. | `number` | `2` | no |
281 | | [new\_nat\_gateway](#input\_new\_nat\_gateway) | Whether to create a new nat gateway. In this template, a new nat gateway will create a nat gateway, eip and server snat entries. | `bool` | `true` | no |
282 | | [node\_cidr\_mask](#input\_node\_cidr\_mask) | The node cidr block to specific how many pods can run on single node. Valid values: [24-28]. | `number` | `24` | no |
283 | | [number\_format](#input\_number\_format) | The number format used to output. | `string` | `"%02d"` | no |
284 | | [proxy\_mode](#input\_proxy\_mode) | Proxy mode is option of kube-proxy. Valid values: 'ipvs','iptables'. Default to 'iptables'. | `string` | `"iptables"` | no |
285 | | [subscription](#input\_subscription) | A mapping of fields for Prepaid ECS instances created. | `map(string)` | {
"auto_renew": false,
"auto_renew_period": 1,
"period": 1,
"period_unit": "Month"
} | no |
286 | | [system\_disk\_category](#input\_system\_disk\_category) | The system disk category used to launch one or more worker ecs instances. | `string` | `"cloud_efficiency"` | no |
287 | | [system\_disk\_size](#input\_system\_disk\_size) | The system disk size used to launch one or more worker ecs instances. | `number` | `40` | no |
288 | | [vpc\_cidr](#input\_vpc\_cidr) | The cidr block used to launch a new vpc when 'vpc\_id' is not specified. | `string` | `"10.0.0.0/8"` | no |
289 | | [vpc\_id](#input\_vpc\_id) | Existing vpc id used to create several vswitches and other resources. | `string` | `""` | no |
290 | | [vpc\_name](#input\_vpc\_name) | The vpc name used to create a new vpc when 'vpc\_id' is not specified. Default to variable `example_name` | `string` | `""` | no |
291 | | [vswitch\_cidrs](#input\_vswitch\_cidrs) | List of cidr blocks used to create several new vswitches when 'vswitch\_ids' is not specified. | `list(string)` | [| no | 292 | | [vswitch\_ids](#input\_vswitch\_ids) | List of existing vswitch id. | `list(string)` | `[]` | no | 293 | | [vswitch\_name\_prefix](#input\_vswitch\_name\_prefix) | The vswitch name prefix used to create several new vswitches. Default to variable 'example\_name'. | `string` | `""` | no | 294 | | [worker\_instance\_types](#input\_worker\_instance\_types) | The ecs instance types used to launch worker nodes. | `list(string)` | `[]` | no | 295 | | [worker\_password](#input\_worker\_password) | The password of worker ECS instance. | `list(string)` |
"10.1.0.0/16",
"10.2.0.0/16",
"10.3.0.0/16"
]
[| no | 296 | 297 | ## Outputs 298 | 299 | | Name | Description | 300 | |------|-------------| 301 | | [cluster\_id](#output\_cluster\_id) | ID of the kunernetes cluster. | 302 | | [cluster\_nodes](#output\_cluster\_nodes) | List nodes of cluster. | 303 | | [nat\_gateway\_id](#output\_nat\_gateway\_id) | The ID of the NAT Gateway. | 304 | | [security\_group\_id](#output\_security\_group\_id) | ID of the Security Group used to deploy kubernetes cluster. | 305 | | [this\_k8s\_node\_ids](#output\_this\_k8s\_node\_ids) | List ids of of cluster node. | 306 | | [vpc\_id](#output\_vpc\_id) | The ID of the VPC. | 307 | | [vswitch\_ids](#output\_vswitch\_ids) | List ID of the VSwitches. | 308 | 309 | 310 | Submit Issues 311 | ------------- 312 | If you have any problems when using this module, please opening a [provider issue](https://github.com/terraform-providers/terraform-provider-alicloud/issues/new) and let us know. 313 | 314 | **Note:** There does not recommend to open an issue on this repo. 315 | 316 | Authors 317 | ------- 318 | Created and maintained by Alibaba Cloud Terraform Team(terraform@alibabacloud.com) 319 | 320 | License 321 | ------- 322 | Mozilla Public License 2.0. See LICENSE for full details. 323 | 324 | Reference 325 | --------- 326 | * [Terraform-Provider-Alicloud Github](https://github.com/terraform-providers/terraform-provider-alicloud) 327 | * [Terraform-Provider-Alicloud Release](https://releases.hashicorp.com/terraform-provider-alicloud/) 328 | * [Terraform-Provider-Alicloud Docs](https://www.terraform.io/docs/providers/alicloud/) 329 | 330 | 331 | -------------------------------------------------------------------------------- /TestRecord.md: -------------------------------------------------------------------------------- 1 | ## 14 Dec 2025 02:24 UTC 2 | 3 | success : false 4 | 5 | ### Versions 6 | 7 | Terraform v1.6.0 8 | on linux_amd64 9 | + provider registry.terraform.io/hashicorp/alicloud v1.265.0 10 | 11 | ## 07 Dec 2025 02:25 UTC 12 | 13 | success : false 14 | 15 | ### Versions 16 | 17 | Terraform v1.6.0 18 | on linux_amd64 19 | + provider registry.terraform.io/hashicorp/alicloud v1.264.0 20 | 21 | ## 30 Nov 2025 03:13 UTC 22 | 23 | success : false 24 | 25 | ### Versions 26 | 27 | Terraform v1.6.0 28 | on linux_amd64 29 | + provider registry.terraform.io/hashicorp/alicloud v1.263.0 30 | 31 | ## 23 Nov 2025 04:12 UTC 32 | 33 | success : false 34 | 35 | ### Versions 36 | 37 | Terraform v1.6.0 38 | on linux_amd64 39 | + provider registry.terraform.io/hashicorp/alicloud v1.263.0 40 | 41 | ## 16 Nov 2025 02:35 UTC 42 | 43 | success : false 44 | 45 | ### Versions 46 | 47 | Terraform v1.6.0 48 | on linux_amd64 49 | + provider registry.terraform.io/hashicorp/alicloud v1.262.1 50 | 51 | ## 09 Nov 2025 03:17 UTC 52 | 53 | success : false 54 | 55 | ### Versions 56 | 57 | Terraform v1.6.0 58 | on linux_amd64 59 | + provider registry.terraform.io/hashicorp/alicloud v1.262.1 60 | 61 | ## 02 Nov 2025 02:41 UTC 62 | 63 | success : false 64 | 65 | ### Versions 66 | 67 | Terraform v1.6.0 68 | on linux_amd64 69 | + provider registry.terraform.io/hashicorp/alicloud v1.262.0 70 | 71 | ## 26 Oct 2025 02:49 UTC 72 | 73 | success : false 74 | 75 | ### Versions 76 | 77 | Terraform v1.6.0 78 | on linux_amd64 79 | + provider registry.terraform.io/hashicorp/alicloud v1.261.0 80 | 81 | ## 19 Oct 2025 02:56 UTC 82 | 83 | success : false 84 | 85 | ### Versions 86 | 87 | Terraform v1.6.0 88 | on linux_amd64 89 | + provider registry.terraform.io/hashicorp/alicloud v1.261.0 90 | 91 | ## 12 Oct 2025 02:19 UTC 92 | 93 | success : false 94 | 95 | ### Versions 96 | 97 | Terraform v1.6.0 98 | on linux_amd64 99 | + provider registry.terraform.io/hashicorp/alicloud v1.260.1 100 | 101 | ## 05 Oct 2025 02:24 UTC 102 | 103 | success : false 104 | 105 | ### Versions 106 | 107 | Terraform v1.6.0 108 | on linux_amd64 109 | + provider registry.terraform.io/hashicorp/alicloud v1.260.1 110 | 111 | ## 28 Sep 2025 02:44 UTC 112 | 113 | success : false 114 | 115 | ### Versions 116 | 117 | Terraform v1.6.0 118 | on linux_amd64 119 | + provider registry.terraform.io/hashicorp/alicloud v1.260.1 120 | 121 | ## 21 Sep 2025 02:29 UTC 122 | 123 | success : false 124 | 125 | ### Versions 126 | 127 | Terraform v1.6.0 128 | on linux_amd64 129 | + provider registry.terraform.io/hashicorp/alicloud v1.260.0 130 | 131 | ## 14 Sep 2025 02:02 UTC 132 | 133 | success : false 134 | 135 | ### Versions 136 | 137 | Terraform v1.6.0 138 | on linux_amd64 139 | + provider registry.terraform.io/hashicorp/alicloud v1.259.0 140 | 141 | ## 07 Sep 2025 03:31 UTC 142 | 143 | success : true 144 | 145 | ### Versions 146 | 147 | Terraform v1.6.0 148 | on linux_amd64 149 | + provider registry.terraform.io/hashicorp/alicloud v1.258.0 150 | 151 | ## 31 Aug 2025 03:19 UTC 152 | 153 | success : false 154 | 155 | ### Versions 156 | 157 | Terraform v1.6.0 158 | on linux_amd64 159 | + provider registry.terraform.io/hashicorp/alicloud v1.258.0 160 | 161 | ## 24 Aug 2025 02:20 UTC 162 | 163 | success : false 164 | 165 | ### Versions 166 | 167 | Terraform v1.6.0 168 | on linux_amd64 169 | + provider registry.terraform.io/hashicorp/alicloud v1.258.0 170 | 171 | ## 17 Aug 2025 03:34 UTC 172 | 173 | success : false 174 | 175 | ### Versions 176 | 177 | Terraform v1.6.0 178 | on linux_amd64 179 | + provider registry.terraform.io/hashicorp/alicloud v1.257.0 180 | 181 | ## 10 Aug 2025 02:42 UTC 182 | 183 | success : false 184 | 185 | ### Versions 186 | 187 | Terraform v1.6.0 188 | on linux_amd64 189 | + provider registry.terraform.io/hashicorp/alicloud v1.256.0 190 | 191 | ## 03 Aug 2025 03:53 UTC 192 | 193 | success : true 194 | 195 | ### Versions 196 | 197 | Terraform v1.6.0 198 | on linux_amd64 199 | + provider registry.terraform.io/hashicorp/alicloud v1.256.0 200 | 201 | ## 27 Jul 2025 03:22 UTC 202 | 203 | success : true 204 | 205 | ### Versions 206 | 207 | Terraform v1.6.0 208 | on linux_amd64 209 | + provider registry.terraform.io/hashicorp/alicloud v1.254.0 210 | 211 | ## 20 Jul 2025 04:19 UTC 212 | 213 | success : true 214 | 215 | ### Versions 216 | 217 | Terraform v1.6.0 218 | on linux_amd64 219 | + provider registry.terraform.io/hashicorp/alicloud v1.253.0 220 | 221 | ## 13 Jul 2025 02:30 UTC 222 | 223 | success : false 224 | 225 | ### Versions 226 | 227 | Terraform v1.6.0 228 | on linux_amd64 229 | + provider registry.terraform.io/hashicorp/alicloud v1.253.0 230 | 231 | ## 06 Jul 2025 03:11 UTC 232 | 233 | success : true 234 | 235 | ### Versions 236 | 237 | Terraform v1.6.0 238 | on linux_amd64 239 | + provider registry.terraform.io/hashicorp/alicloud v1.253.0 240 | 241 | ## 29 Jun 2025 03:54 UTC 242 | 243 | success : true 244 | 245 | ### Versions 246 | 247 | Terraform v1.6.0 248 | on linux_amd64 249 | + provider registry.terraform.io/hashicorp/alicloud v1.252.0 250 | 251 | ## 22 Jun 2025 03:08 UTC 252 | 253 | success : true 254 | 255 | ### Versions 256 | 257 | Terraform v1.6.0 258 | on linux_amd64 259 | + provider registry.terraform.io/hashicorp/alicloud v1.251.0 260 | 261 | ## 15 Jun 2025 03:32 UTC 262 | 263 | success : true 264 | 265 | ### Versions 266 | 267 | Terraform v1.6.0 268 | on linux_amd64 269 | + provider registry.terraform.io/hashicorp/alicloud v1.251.0 270 | 271 | ## 08 Jun 2025 04:22 UTC 272 | 273 | success : true 274 | 275 | ### Versions 276 | 277 | Terraform v1.6.0 278 | on linux_amd64 279 | + provider registry.terraform.io/hashicorp/alicloud v1.250.0 280 | 281 | ## 01 Jun 2025 03:55 UTC 282 | 283 | success : true 284 | 285 | ### Versions 286 | 287 | Terraform v1.6.0 288 | on linux_amd64 289 | + provider registry.terraform.io/hashicorp/alicloud v1.250.0 290 | 291 | ## 25 May 2025 03:47 UTC 292 | 293 | success : true 294 | 295 | ### Versions 296 | 297 | Terraform v1.6.0 298 | on linux_amd64 299 | + provider registry.terraform.io/hashicorp/alicloud v1.249.0 300 | 301 | ## 18 May 2025 03:44 UTC 302 | 303 | success : true 304 | 305 | ### Versions 306 | 307 | Terraform v1.6.0 308 | on linux_amd64 309 | + provider registry.terraform.io/hashicorp/alicloud v1.249.0 310 | 311 | ## 11 May 2025 04:04 UTC 312 | 313 | success : false 314 | 315 | ### Versions 316 | 317 | Terraform v1.6.0 318 | on linux_amd64 319 | + provider registry.terraform.io/hashicorp/alicloud v1.248.0 320 | 321 | ## 04 May 2025 03:07 UTC 322 | 323 | success : false 324 | 325 | ### Versions 326 | 327 | Terraform v1.6.0 328 | on linux_amd64 329 | + provider registry.terraform.io/hashicorp/alicloud v1.248.0 330 | 331 | ## 27 Apr 2025 03:43 UTC 332 | 333 | success : true 334 | 335 | ### Versions 336 | 337 | Terraform v1.6.0 338 | on linux_amd64 339 | + provider registry.terraform.io/hashicorp/alicloud v1.248.0 340 | 341 | ## 20 Apr 2025 03:59 UTC 342 | 343 | success : true 344 | 345 | ### Versions 346 | 347 | Terraform v1.6.0 348 | on linux_amd64 349 | + provider registry.terraform.io/hashicorp/alicloud v1.248.0 350 | 351 | ## 13 Apr 2025 05:59 UTC 352 | 353 | success : true 354 | 355 | ### Versions 356 | 357 | Terraform v1.6.0 358 | on linux_amd64 359 | + provider registry.terraform.io/hashicorp/alicloud v1.247.0 360 | 361 | ## 06 Apr 2025 03:35 UTC 362 | 363 | success : true 364 | 365 | ### Versions 366 | 367 | Terraform v1.6.0 368 | on linux_amd64 369 | + provider registry.terraform.io/hashicorp/alicloud v1.247.0 370 | 371 | ## 30 Mar 2025 02:53 UTC 372 | 373 | success : true 374 | 375 | ### Versions 376 | 377 | Terraform v1.6.0 378 | on linux_amd64 379 | + provider registry.terraform.io/hashicorp/alicloud v1.246.2 380 | 381 | ## 25 Mar 2025 02:49 UTC 382 | 383 | success : true 384 | 385 | ### Versions 386 | 387 | Terraform v1.6.0 388 | on linux_amd64 389 | + provider registry.terraform.io/hashicorp/alicloud v1.246.0 390 | 391 | ## 23 Mar 2025 02:51 UTC 392 | 393 | success : false 394 | 395 | ### Versions 396 | 397 | Terraform v1.6.0 398 | on linux_amd64 399 | + provider registry.terraform.io/hashicorp/alicloud v1.245.0 400 | 401 | ## 16 Mar 2025 07:48 UTC 402 | 403 | success : true 404 | 405 | ### Versions 406 | 407 | Terraform v1.6.0 408 | on linux_amd64 409 | + provider registry.terraform.io/hashicorp/alicloud v1.244.0 410 | 411 | ## 09 Mar 2025 05:57 UTC 412 | 413 | success : true 414 | 415 | ### Versions 416 | 417 | Terraform v1.6.0 418 | on linux_amd64 419 | + provider registry.terraform.io/hashicorp/alicloud v1.244.0 420 | 421 | ## 02 Mar 2025 05:41 UTC 422 | 423 | success : false 424 | 425 | ### Versions 426 | 427 | Terraform v1.6.0 428 | on linux_amd64 429 | + provider registry.terraform.io/hashicorp/alicloud v1.244.0 430 | 431 | ## 23 Feb 2025 05:16 UTC 432 | 433 | success : true 434 | 435 | ### Versions 436 | 437 | Terraform v1.6.0 438 | on linux_amd64 439 | + provider registry.terraform.io/hashicorp/alicloud v1.243.0 440 | 441 | ## 16 Feb 2025 04:51 UTC 442 | 443 | success : true 444 | 445 | ### Versions 446 | 447 | Terraform v1.6.0 448 | on linux_amd64 449 | + provider registry.terraform.io/hashicorp/alicloud v1.242.0 450 | 451 | ## 13 Feb 2025 07:10 UTC 452 | 453 | success : true 454 | 455 | ### Versions 456 | 457 | Terraform v1.6.0 458 | on linux_amd64 459 | + provider registry.terraform.io/hashicorp/alicloud v1.242.0 460 | 461 | ## 09 Feb 2025 06:14 UTC 462 | 463 | success : false 464 | 465 | ### Versions 466 | 467 | Terraform v1.6.0 468 | on linux_amd64 469 | + provider registry.terraform.io/hashicorp/alicloud v1.242.0 470 | 471 | ## 02 Feb 2025 05:39 UTC 472 | 473 | success : false 474 | 475 | ### Versions 476 | 477 | Terraform v1.6.0 478 | on linux_amd64 479 | + provider registry.terraform.io/hashicorp/alicloud v1.242.0 480 | 481 | ## 26 Jan 2025 05:53 UTC 482 | 483 | success : false 484 | 485 | ### Versions 486 | 487 | Terraform v1.6.0 488 | on linux_amd64 489 | + provider registry.terraform.io/hashicorp/alicloud v1.242.0 490 | 491 | ## 19 Jan 2025 05:22 UTC 492 | 493 | success : false 494 | 495 | ### Versions 496 | 497 | Terraform v1.6.0 498 | on linux_amd64 499 | + provider registry.terraform.io/hashicorp/alicloud v1.241.0 500 | 501 | ## 12 Jan 2025 05:20 UTC 502 | 503 | success : false 504 | 505 | ### Versions 506 | 507 | Terraform v1.6.0 508 | on linux_amd64 509 | + provider registry.terraform.io/hashicorp/alicloud v1.240.0 510 | 511 | ## 05 Jan 2025 05:44 UTC 512 | 513 | success : true 514 | 515 | ### Versions 516 | 517 | Terraform v1.6.0 518 | on linux_amd64 519 | + provider registry.terraform.io/hashicorp/alicloud v1.240.0 520 | 521 | ## 29 Dec 2024 05:02 UTC 522 | 523 | success : true 524 | 525 | ### Versions 526 | 527 | Terraform v1.6.0 528 | on linux_amd64 529 | + provider registry.terraform.io/hashicorp/alicloud v1.239.0 530 | 531 | ## 22 Dec 2024 05:20 UTC 532 | 533 | success : true 534 | 535 | ### Versions 536 | 537 | Terraform v1.6.0 538 | on linux_amd64 539 | + provider registry.terraform.io/hashicorp/alicloud v1.239.0 540 | 541 | ## 15 Dec 2024 05:13 UTC 542 | 543 | success : true 544 | 545 | ### Versions 546 | 547 | Terraform v1.6.0 548 | on linux_amd64 549 | + provider registry.terraform.io/hashicorp/alicloud v1.237.0 550 | 551 | ## 08 Dec 2024 06:24 UTC 552 | 553 | success : true 554 | 555 | ### Versions 556 | 557 | Terraform v1.6.0 558 | on linux_amd64 559 | + provider registry.terraform.io/hashicorp/alicloud v1.237.0 560 | 561 | ## 01 Dec 2024 05:55 UTC 562 | 563 | success : true 564 | 565 | ### Versions 566 | 567 | Terraform v1.6.0 568 | on linux_amd64 569 | + provider registry.terraform.io/hashicorp/alicloud v1.236.0 570 | 571 | ## 24 Nov 2024 06:04 UTC 572 | 573 | success : true 574 | 575 | ### Versions 576 | 577 | Terraform v1.6.0 578 | on linux_amd64 579 | + provider registry.terraform.io/hashicorp/alicloud v1.235.0 580 | 581 | ## 17 Nov 2024 05:51 UTC 582 | 583 | success : true 584 | 585 | ### Versions 586 | 587 | Terraform v1.6.0 588 | on linux_amd64 589 | + provider registry.terraform.io/hashicorp/alicloud v1.234.0 590 | 591 | ## 10 Nov 2024 04:19 UTC 592 | 593 | success : true 594 | 595 | ### Versions 596 | 597 | Terraform v1.6.0 598 | on linux_amd64 599 | + provider registry.terraform.io/hashicorp/alicloud v1.233.0 600 | 601 | ## 03 Nov 2024 04:09 UTC 602 | 603 | success : false 604 | 605 | ### Versions 606 | 607 | Terraform v1.6.0 608 | on linux_amd64 609 | + provider registry.terraform.io/hashicorp/alicloud v1.233.0 610 | 611 | ## 27 Oct 2024 05:14 UTC 612 | 613 | success : true 614 | 615 | ### Versions 616 | 617 | Terraform v1.6.0 618 | on linux_amd64 619 | + provider registry.terraform.io/hashicorp/alicloud v1.232.0 620 | 621 | ## 20 Oct 2024 04:37 UTC 622 | 623 | success : true 624 | 625 | ### Versions 626 | 627 | Terraform v1.6.0 628 | on linux_amd64 629 | + provider registry.terraform.io/hashicorp/alicloud v1.231.0 630 | 631 | ## 13 Oct 2024 04:25 UTC 632 | 633 | success : true 634 | 635 | ### Versions 636 | 637 | Terraform v1.6.0 638 | on linux_amd64 639 | + provider registry.terraform.io/hashicorp/alicloud v1.231.0 640 | 641 | ## 06 Oct 2024 04:38 UTC 642 | 643 | success : true 644 | 645 | ### Versions 646 | 647 | Terraform v1.6.0 648 | on linux_amd64 649 | + provider registry.terraform.io/hashicorp/alicloud v1.231.0 650 | 651 | ## 29 Sep 2024 04:35 UTC 652 | 653 | success : true 654 | 655 | ### Versions 656 | 657 | Terraform v1.6.0 658 | on linux_amd64 659 | + provider registry.terraform.io/hashicorp/alicloud v1.231.0 660 | 661 | ## 22 Sep 2024 04:57 UTC 662 | 663 | success : true 664 | 665 | ### Versions 666 | 667 | Terraform v1.6.0 668 | on linux_amd64 669 | + provider registry.terraform.io/hashicorp/alicloud v1.230.1 670 | 671 | ## 15 Sep 2024 04:28 UTC 672 | 673 | success : true 674 | 675 | ### Versions 676 | 677 | Terraform v1.6.0 678 | on linux_amd64 679 | + provider registry.terraform.io/hashicorp/alicloud v1.230.1 680 | 681 | ## 08 Sep 2024 05:44 UTC 682 | 683 | success : false 684 | 685 | ### Versions 686 | 687 | Terraform v1.6.0 688 | on linux_amd64 689 | + provider registry.terraform.io/hashicorp/alicloud v1.230.0 690 | 691 | ## 01 Sep 2024 05:15 UTC 692 | 693 | success : true 694 | 695 | ### Versions 696 | 697 | Terraform v1.6.0 698 | on linux_amd64 699 | + provider registry.terraform.io/hashicorp/alicloud v1.229.1 700 | 701 | ## 18 Aug 2024 04:01 UTC 702 | 703 | success : true 704 | 705 | ### Versions 706 | 707 | Terraform v1.6.0 708 | on linux_amd64 709 | + provider registry.terraform.io/hashicorp/alicloud v1.228.0 710 | 711 | ## 11 Aug 2024 03:22 UTC 712 | 713 | success : true 714 | 715 | ### Versions 716 | 717 | Terraform v1.6.0 718 | on linux_amd64 719 | + provider registry.terraform.io/hashicorp/alicloud v1.227.1 720 | 721 | ## 04 Aug 2024 02:51 UTC 722 | 723 | success : true 724 | 725 | ### Versions 726 | 727 | Terraform v1.6.0 728 | on linux_amd64 729 | + provider registry.terraform.io/hashicorp/alicloud v1.227.1 730 | 731 | ## 28 Jul 2024 03:04 UTC 732 | 733 | success : true 734 | 735 | ### Versions 736 | 737 | Terraform v1.6.0 738 | on linux_amd64 739 | + provider registry.terraform.io/hashicorp/alicloud v1.227.1 740 | 741 | ## 21 Jul 2024 03:02 UTC 742 | 743 | success : true 744 | 745 | ### Versions 746 | 747 | Terraform v1.6.0 748 | on linux_amd64 749 | + provider registry.terraform.io/hashicorp/alicloud v1.227.0 750 | 751 | ## 14 Jul 2024 03:22 UTC 752 | 753 | success : true 754 | 755 | ### Versions 756 | 757 | Terraform v1.6.0 758 | on linux_amd64 759 | + provider registry.terraform.io/hashicorp/alicloud v1.227.0 760 | 761 | ## 07 Jul 2024 03:46 UTC 762 | 763 | success : true 764 | 765 | ### Versions 766 | 767 | Terraform v1.6.0 768 | on linux_amd64 769 | + provider registry.terraform.io/hashicorp/alicloud v1.226.0 770 | 771 | ## 30 Jun 2024 03:19 UTC 772 | 773 | success : true 774 | 775 | ### Versions 776 | 777 | Terraform v1.6.0 778 | on linux_amd64 779 | + provider registry.terraform.io/hashicorp/alicloud v1.225.1 780 | 781 | ## 23 Jun 2024 03:17 UTC 782 | 783 | success : true 784 | 785 | ### Versions 786 | 787 | Terraform v1.6.0 788 | on linux_amd64 789 | + provider registry.terraform.io/hashicorp/alicloud v1.225.0 790 | 791 | ## 16 Jun 2024 02:58 UTC 792 | 793 | success : true 794 | 795 | ### Versions 796 | 797 | Terraform v1.6.0 798 | on linux_amd64 799 | + provider registry.terraform.io/hashicorp/alicloud v1.225.0 800 | 801 | ## 09 Jun 2024 03:32 UTC 802 | 803 | success : true 804 | 805 | ### Versions 806 | 807 | Terraform v1.6.0 808 | on linux_amd64 809 | + provider registry.terraform.io/hashicorp/alicloud v1.224.0 810 | 811 | ## 02 Jun 2024 04:58 UTC 812 | 813 | success : true 814 | 815 | ### Versions 816 | 817 | Terraform v1.6.0 818 | on linux_amd64 819 | + provider registry.terraform.io/hashicorp/alicloud v1.224.0 820 | 821 | ## 26 May 2024 04:12 UTC 822 | 823 | success : true 824 | 825 | ### Versions 826 | 827 | Terraform v1.6.0 828 | on linux_amd64 829 | + provider registry.terraform.io/hashicorp/alicloud v1.223.2 830 | 831 | ## 19 May 2024 05:30 UTC 832 | 833 | success : true 834 | 835 | ### Versions 836 | 837 | Terraform v1.6.0 838 | on linux_amd64 839 | + provider registry.terraform.io/hashicorp/alicloud v1.223.1 840 | 841 | ## 12 May 2024 04:05 UTC 842 | 843 | success : true 844 | 845 | ### Versions 846 | 847 | Terraform v1.6.0 848 | on linux_amd64 849 | + provider registry.terraform.io/hashicorp/alicloud v1.223.0 850 | 851 | ## 06 May 2024 06:23 UTC 852 | 853 | success : true 854 | 855 | ### Versions 856 | 857 | Terraform v1.6.0 858 | on linux_amd64 859 | + provider registry.terraform.io/hashicorp/alicloud v1.223.0 860 | 861 | ## 28 Apr 2024 03:52 UTC 862 | 863 | success : true 864 | 865 | ### Versions 866 | 867 | Terraform v1.6.0 868 | on linux_amd64 869 | + provider registry.terraform.io/hashicorp/alicloud v1.222.0 870 | 871 | ## 21 Apr 2024 04:07 UTC 872 | 873 | success : true 874 | 875 | ### Versions 876 | 877 | Terraform v1.6.0 878 | on linux_amd64 879 | + provider registry.terraform.io/hashicorp/alicloud v1.221.0 880 | 881 | ## 14 Apr 2024 04:01 UTC 882 | 883 | success : true 884 | 885 | ### Versions 886 | 887 | Terraform v1.6.0 888 | on linux_amd64 889 | + provider registry.terraform.io/hashicorp/alicloud v1.220.1 890 | 891 | ## 07 Apr 2024 03:48 UTC 892 | 893 | success : true 894 | 895 | ### Versions 896 | 897 | Terraform v1.6.0 898 | on linux_amd64 899 | + provider registry.terraform.io/hashicorp/alicloud v1.220.1 900 | 901 | ## 31 Mar 2024 03:52 UTC 902 | 903 | success : true 904 | 905 | ### Versions 906 | 907 | Terraform v1.6.0 908 | on linux_amd64 909 | + provider registry.terraform.io/hashicorp/alicloud v1.219.0 910 | 911 | --------------------------------------------------------------------------------
"Just4Test"
]