alibaba / terraform-provider

[DEPRECATED] This repo has been deprecated and please access https://github.com/terraform-providers/terraform-provider-alicloud
Apache License 2.0
384 stars 117 forks source link

ecs charge type issue #320

Open henry-zhang opened 6 years ago

henry-zhang commented 6 years ago

I try to use PrePaid, but api return not exist.

alicloud_instance.dev_api01: Creating... allocate_public_ip: "" => "false" availability_zone: "" => "cn-beijing-c" host_name: "" => "" image_id: "" => "ubuntu_16_0402_64_20G_alibase_20170818.vhd" instance_charge_type: "" => "PrePaid" instance_name: "" => "bj_dev_api01" instance_type: "" => "ecs.mn4.xlarge" internet_charge_type: "" => "" is_outdated: "" => "true" key_name: "" => "" password: "" => "" period: "" => "1" private_ip: "" => "" public_ip: "" => "" security_groups.#: "" => "1" security_groups.2177678232: "" => "sg-2ze0wnkgoh2tr4gj8b9u" status: "" => "" subnet_id: "" => "" system_disk_category: "" => "cloud_efficiency" system_disk_size: "" => "" tags.%: "" => "1" tags.Name: "" => "bj-dev-api01" user_data: "" => "#!/bin/bash -v\napt-get update -y\n#apt-get dist-upgrade -y\napt-get install docker-compose -y\n" vswitch_id: "" => "vsw-2ze467p48427f6mjipcpq"

Error: Error applying plan:

1 error(s) occurred:

Terraform does not automatically rollback in the face of errors. Instead, your Terraform state file has been partially updated with any resources that successfully completed. Please address the error above and apply again to incrementally change your infrastructure.

bittopaz commented 6 years ago

terraform alicloud provider only support "PostPaid" instance now

xiaozhu36 commented 6 years ago

Hi @henry-zhang I am sorry for that. I have released version 1.5.0 and it fixed above error. Please update it. After updated, you can specify new field 'period_unit', and it support 'Month' and 'Week'. Thanks a lot.

Hi @bittopaz terraform alicloud provider always supports 'PrePaid'. Besides, the latest version version 1.5.0 has supported to change 'PostPaid' to 'PrePaid', and welcome to update and use it. Thanks a lot.

Regards He Guimin

henry-zhang commented 6 years ago

I tried and it works,thanks xiaozhu36

BlaCatRu commented 6 years ago

Hi I got the same error with latest 1.7.1

alicloud_instance.instance0: Creating... availability_zone: "" => "" dry_run: "" => "false" host_name: "" => "" image_id: "" => "centos_7_04_64_20G_alibase_201701015.vhd" include_data_disks: "" => "true" instance_charge_type: "" => "PrePaid" instance_name: "" => "node_cnhk_1_1" instance_type: "" => "ecs.sn1.3xlarge" internet_charge_type: "" => "PayByTraffic" internet_max_bandwidth_in: "" => "" internet_max_bandwidth_out: "" => "100" is_outdated: "" => "true" key_name: "" => "" period: "" => "1" period_unit: "" => "Month" private_ip: "" => "" public_ip: "" => "" role_name: "" => "" security_groups.#: "" => "1" security_groups.2454939709: "" => "sg-j6c0umib8apomryf5d8l" status: "" => "" subnet_id: "" => "" system_disk_category: "" => "cloud_efficiency" system_disk_size: "" => "" vswitch_id: "" => "vsw-j6chndubqn4iu55j0yc4j"

Error: Error applying plan:

1 error(s) occurred:

xiaozhu36 commented 6 years ago

@BlaCatRu I am sorry for that. At present, result from some inner reason, we can not support international account(your account is international account) to create 'PrePaid' instance. But we are working on resolving it and please be patient, thanks a lot.

Regards He Guimin

ningblue commented 1 month ago

时过境迁,过了N年 ,问题依旧.

xiaozhu36 commented 1 month ago

@ningblue 你好,现在已经支持创建预付费的 ECS 实例了,可以提供下你的报错信息么?