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

ecs charge type issue #320

Open
henry-zhang opened this issue Dec 28, 2017 · 7 comments
Open

ecs charge type issue #320

henry-zhang opened this issue Dec 28, 2017 · 7 comments

Comments

@henry-zhang
Copy link

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:

  • alicloud_instance.dev_api01: 1 error(s) occurred:

  • alicloud_instance.dev_api01: Error creating Aliyun ecs instance: &common.Error{ErrorResponse:common.ErrorResponse{Response:common.Response{RequestId:"00072C24-46F2-4164-A997-2DC0F9F0F2F6"}, HostId:"ecs-cn-hangzhou.aliyuncs.com", Code:"InvalidInstanceChargeType.NotFound", Message:"The InstanceChargeType does not exist in our records"}, StatusCode:404}

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
Copy link

terraform alicloud provider only support "PostPaid" instance now

@xiaozhu36
Copy link
Collaborator

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
Copy link
Author

I tried and it works,thanks xiaozhu36

@BlaCatRu
Copy link

BlaCatRu commented Feb 7, 2018

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:

  • alicloud_instance.instance0: 1 error(s) occurred:

  • alicloud_instance.instance0: Error creating Aliyun ecs instance: &common.Error{ErrorResponse:common.ErrorResponse{Response:common.Response{RequestId:"3A9C7FCF-33B1-4F26-B504-1F4A926213F1"}, HostId:"ecs-cn-hangzhou.aliyuncs.com", Code:"InvalidInstanceChargeType.NotFound", Message:"The InstanceChargeType does not exist in our records"}, StatusCode:404}

@xiaozhu36
Copy link
Collaborator

xiaozhu36 commented Feb 9, 2018

@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

@xiaozhu36 xiaozhu36 reopened this Feb 9, 2018
Zhuo-An pushed a commit to Zhuo-An/terraform-provider that referenced this issue Oct 8, 2018
Improve fc test case using new datasource alicloud_account
@ningblue
Copy link

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

@xiaozhu36
Copy link
Collaborator

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

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

5 participants