aliyun / terraform-provider-alicloud

Terraform AliCloud provider
https://www.terraform.io/docs/providers/alicloud/
Mozilla Public License 2.0
591 stars 554 forks source link

Instance tags aren't match #2601

Open lihopentium opened 4 years ago

lihopentium commented 4 years ago

Create an instance with more than 10 tags, only 5~8 tags will be applied.

Terraform Version

Terraform v0.12.24

Provider Version

provider.alicloud v1.88.0

Affected Resource(s)

Terraform Configuration Files

resource "alicloud_instance" "instance" { image_id = var.image_id instance_type = var.instance_type security_groups = var.security_groups vswitch_id = var.vswitch_id

tags = { "tag1": "value1", "tag2": "value2", "tag3": "value3", "tag4": "value4", "tag5": "value5", "tag6": "value6", "tag7": "value7", "tag8": "value8", "tag9": "value9", "tagA": "valueA", "tagB": "valueB", } }

- variables.tf

variable "access_key" { type = string description = "The aws access_key" default = "" }

variable "secret_key" { type = string description = "The aws secret_key" default = "" }

variable "region" { type = string description = "The region" default = "" }

variable "image_id" { type = string description = "The instance image id" default = "" }

variable "instance_type" { type = string description = "The instance hardware specification, ex: ecs.t5-lc2m1.nano" default = "" }

variable "security_groups" { type = list(string) description = "The security groups" default = [] }

variable "vswitch_id" { type = string description = "The virtual private cloud switch" default = "" }


### Debug Output
- terraform apply

An execution plan has been generated and is shown below. Resource actions are indicated with the following symbols:

Terraform will perform the following actions:

alicloud_instance.instance will be created

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve.

Enter a value: yes

alicloud_instance.instance: Creating... alicloud_instance.instance: Still creating... [10s elapsed] alicloud_instance.instance: Still creating... [20s elapsed] alicloud_instance.instance: Still creating... [30s elapsed] alicloud_instance.instance: Still creating... [40s elapsed] alicloud_instance.instance: Creation complete after 43s [id=i-j6ciw5enua6ghmadod4j]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

instance_info = [ [ { "auto_release_time" = "" "availability_zone" = "cn-hongkong-c" "credit_specification" = "Standard" "data_disks" = [] "deletion_protection" = false "description" = "" "dry_run" = false "host_name" = "iZj6ciw5enua6ghmadod4jZ" "id" = "i-xxxx" "image_id" = "centos_6_09_64_20G_alibase_20180326.vhd" "instance_charge_type" = "PostPaid" "instance_name" = "ECS-Instance" "instance_type" = "ecs.t5-lc2m1.nano" "internet_charge_type" = "PayByTraffic" "internet_max_bandwidth_in" = -1 "internet_max_bandwidth_out" = 0 "key_name" = "" "password" = "" "private_ip" = "172.31.220.173" "public_ip" = "" "resource_group_id" = "" "security_groups" = [ "sg-xxx", ] "spot_price_limit" = 0 "spot_strategy" = "NoSpot" "status" = "Running" "subnet_id" = "vsw-xxx" "system_disk_auto_snapshot_policy_id" = "" "system_disk_category" = "cloud_efficiency" "system_disk_size" = 40 "tags" = { "tag3" = "value3" "tag4" = "value4" "tag5" = "value5" "tag6" = "value6" "tag7" = "value7" "tag8" = "value8" "tag9" = "value9" "tagA" = "valueA" "tagB" = "valueB" } "volume_tags" = { "tag3" = "value3" "tag4" = "value4" "tag5" = "value5" "tag6" = "value6" "tag7" = "value7" "tag8" = "value8" "tag9" = "value9" "tagA" = "valueA" "tagB" = "valueB" } "vswitch_id" = "vsw-xxx" }, ], ]



### Expected Behavior
Create tags from input

### Actual Behavior
Only add 5~9 tags to the instance

### Steps to Reproduce
`terraform apply`
xiaozhu36 commented 3 years ago

HI @lihopentium I am sorry for this issue and I have fixed it by the PR #3618 and it will be released today.