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

provider/alicloud: failed to create PrePaid alicloud_instance #13661

Closed
pragkent opened this issue Apr 14, 2017 · 2 comments · Fixed by #13662
Closed

provider/alicloud: failed to create PrePaid alicloud_instance #13661

pragkent opened this issue Apr 14, 2017 · 2 comments · Fixed by #13662

Comments

@pragkent
Copy link
Contributor

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Terraform v0.9.2

Affected Resource(s)

  • alicloud_instance

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

data "alicloud_images" "ubuntu" {
  most_recent = true
  owners      = "system"
  name_regex  = "ubuntu"
}

resource "alicloud_security_group" "proxy" {
  name        = "proxy"
  description = "security group for proxy server"
}

resource "alicloud_security_group_rule" "allow_ingress_tcp_ssh" {
  type              = "ingress"
  ip_protocol       = "tcp"
  port_range        = "22/22"
  priority          = 100
  security_group_id = "${alicloud_security_group.proxy.id}"
  cidr_ip           = "0.0.0.0/0"
}


resource "alicloud_instance" "proxy" {
  instance_name              = "testa-public-ip"
  instance_type                = "ecs.xn4.small"
  io_optimized                  = "optimized"
  image_id                        = "${data.alicloud_images.ubuntu.images.0.id}"
  system_disk_category  = "cloud_efficiency"
  security_groups            = ["${alicloud_security_group.proxy.*.id}"]
  allocate_public_ip         = true
  instance_charge_type  = "PrePaid"
  period = 1

  tags {
    role = "proxy"
  }
}

Debug Output

Error applying plan:

1 error(s) occurred:

* alicloud_instance.proxy: 1 error(s) occurred:

* alicloud_instance.proxy: Error creating Aliyun ecs instance: &common.Error{ErrorResponse:common.ErrorResponse{Response:common.Response{RequestId:"89DCC62F-BEE7-4A57-94A6-25F786F73D0E"}, HostId:"ecs-cn-hangzhou.aliyuncs.com", Code:"InvalidIoOptimizedValue.ValueNotSupported", Message:"IoOptimized value not supported."}, StatusCode:400}

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.

Panic Output

Expected Behavior

A PrePaid instance is created

Actual Behavior

terraform reports a error

Steps to Reproduce

  1. terraform apply

Important Factoids

References

alicloud CreateInstance api

@pragkent
Copy link
Contributor Author

I will submit a pull request soon.

@ghost
Copy link

ghost commented Apr 14, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants