Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform job should fail immediately after kubernetes create failed #488

Open
georgedriver opened this issue Jun 5, 2018 · 1 comment

Comments

@georgedriver
Copy link

terraform job should fail immediately after kubernetes create failed

Issue

terraform job should fail immediately after kubernetes create failed

Version

terraform version
Terraform v0.11.7
+ provider.alicloud (unversioned)   <<< Build from master branch with commit: ab466d155bf98c04d80de6dea2c3fc513419110f

Detailed error on aliyun page

No matter what kind of error, the terraform job still running until timeout. 

Code

main.tf

// Provider specific configs
provider "alicloud" {
  access_key = "${var.alicloud_access_key}"
  secret_key = "${var.alicloud_secret_key}"
  region     = "${var.region}"
}

data "alicloud_instance_types" "default-master" {
  availability_zone = "${var.availability_zone}"
  cpu_core_count    = 2
  memory_size       = 4
}

data "alicloud_instance_types" "default-worker" {
  availability_zone = "${var.availability_zone}"
  cpu_core_count    = 8
  memory_size       = 16
}

resource "alicloud_cs_kubernetes" "lims-cluster-1" {
  name                  = "lims-cluster-1"
  new_nat_gateway       = true
  master_instance_type  = "${data.alicloud_instance_types.default-master.instance_types.0.id}"
  worker_instance_type  = "${data.alicloud_instance_types.default-worker.instance_types.0.id}"
  worker_number         = 1
  master_disk_category  = "cloud_efficiency"
  worker_disk_category  = "cloud_efficiency"
  master_disk_size      = 40
  worker_disk_size      = 100
  password              = "${var.ecs_password}"
  pod_cidr              = "${var.pod_cidr}"
  service_cidr          = "${var.service_cidr}"
  enable_ssh            = true
  install_cloud_monitor = true
}

variable "alicloud_access_key" { default = "" }
variable "alicloud_secret_key" { default = "" }
variable "region" {}
variable "availability_zone" {}
variable "pod_cidr" {}
variable "service_cidr" {}
variable "ecs_password" {}

terraform.tfvars

region = "cn-shenzhen"
availability_zone = "cn-shenzhen-a"
ecs_password = "Pass123"
service_cidr = "10.128.1.0/24"
pod_cidr = "10.129.1.0/24"

How to reproduce

export TF_VAR_alicloud_access_key='your access key'
export TF_VAR_alicloud_secret_key='your secret key'

terraform init
terraform plan 
terraform apply

phenomena

Look into aliyun Kubernetes manage page, you will get the error about "invalid password format", but the terraform keep running.

@xiaozhu36
Copy link
Collaborator

HI @georgedriver I am sorry for late reply. Does it still exist?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants