FlexibleEngineCloud / terraform-provider-flexibleengine

Terraform flexibleengine provider
https://www.terraform.io/docs/providers/flexibleengine/
Mozilla Public License 2.0
30 stars 53 forks source link

MRS component_list serialization issue ? #45

Closed nsabernierdev1 closed 6 years ago

nsabernierdev1 commented 6 years ago

Hi there,

Terraform Version

Terraform v0.10.7

Affected Resource(s)

flexibleengine_mrs_cluster_v1

Terraform Configuration Files

# Configure the FlexibleEngine Provider with AK/SK
# This will work with a single defined/default network, otherwise you need to specify network
# to fix errrors about multiple networks found.
provider "flexibleengine" {
  region      = "eu-west-0"
}

# Create a MRS cluster
resource "flexibleengine_mrs_cluster_v1" "cluster1" {
  cluster_name = "mrs-cluster-sbenewFromTerraform"
  region = "eu-west-0"
  billing_type = 12
  master_node_num = 2
  core_node_num = 3
  master_node_size = "s1.4xlarge.linux.mrs"
  core_node_size = "s1.xlarge.linux.mrs"
  available_zone_id = "eu-west-0a"
  vpc_id = "3d8f211c-f5ef-4756-b0ea-0c7d064c30cd"
  subnet_id = "4cb41d69-d560-4836-a230-003b6ec77379"
  cluster_version = "MRS 1.3.0"
  volume_type = "SSD"
  volume_size = 100
  safe_mode = 0
  cluster_type = 0
  node_public_cert_name = "keyPairSB"
  cluster_admin_secret = ""
  component_list {
      component_name = "Hadoop"
  }
  component_list {
      component_name = "Spark"
  }
  component_list {
      component_name = "Hive"
  }
}

Debug Output

https://gist.github.com/nsabernierdev1/582b453d71957ec90570384b67621353#file-terraform-log

Expected Behavior

The MRS cluster should be created

Actual Behavior

Json request is not well formed: Actual: "component_list":[]interface {}{map[string]interface {}{"component_name":"Hadoop"}, map[string]interface {}{"component_name":"Spark"}, map[string]interface {}{"component_name":"Hive"}} Should be: "component_list":[ {"component_name":"Hadoop"}, {"component_name":"Spark"}, {"component_name":"Hive"} ],

Steps to Reproduce

  1. Build master release of flexibleengine provider.
  2. terraform apply
niuzhenguo commented 6 years ago

@nsabernierdev1 Can you provide the detailed debug log with TF_LOG=DEBUG and OS_DEBUG=1 set, thanks!

nsabernierdev1 commented 6 years ago

When setting debug to OS_DEBUG I findout from the logs that the issue was due to memory quota limit issue. So I fixed the quota and now it works fine. So the issue can be fixed.