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

Error: alicloud_key_pair.key_pair: Provider doesn't support resource: alicloud_key_pair #16857

Closed
bhordupur opened this issue Dec 6, 2017 · 3 comments

Comments

@bhordupur
Copy link

Terraform Version

Terraform v0.11.1

Terraform Configuration Files

###Skipped the rest 
variable "private_key_file" {
  default = "alicloud_ssh_key.pem"
}

variable "key_name" {
  default = "key-pair-from-terraform"
}
resource "alicloud_key_pair" "key_pair" {
  key_name = "${var.key_name}"
  key_file = "${var.private_key_file}"
}

resource "alicloud_instance" "instance" {
  instance_name = "${var.short_name}-${var.role}-${format(var.count_format, count.index+1)}"
  host_name = "${var.short_name}-${var.role}-${format(var.count_format, count.index+1)}"
  image_id = "${var.image_id}"
  instance_type = "${data.alicloud_instance_types.instance_type.instance_types.0.id}"
  count = "${var.count}"
  availability_zone = "${var.availability_zones}"
  security_groups = ["${alicloud_security_group.group.*.id}"]

  internet_charge_type = "${var.internet_charge_type}"
  internet_max_bandwidth_out = "${var.internet_max_bandwidth_out}"
  io_optimized = "optimized"
  password = "${var.ecs_password}"
  key_name = "${alicloud_key_pair.key_pair.id}"

  allocate_public_ip = "${var.allocate_public_ip}"

  instance_charge_type = "PostPaid"
  system_disk_category = "${var.disk_category}"

  vswitch_id = "${alicloud_vswitch.main.id}"

  tags {
    role = "${var.role}"
    dc = "${var.datacenter}"
  }

}

Affected Resource(s)

  • alicloud_key_pair

Actual Behavior

Error: alicloud_instance.instance[0]: : invalid or unknown key: key_name
Error: alicloud_instance.instance[1]: : invalid or unknown key: key_name
Error: alicloud_key_pair.key_pair: Provider doesn't support resource: alicloud_key_pair

Steps to Reproduce

terraform plan

@hashibot
Copy link
Contributor

hashibot commented Dec 7, 2017

This issue has been automatically migrated to terraform-providers/terraform-provider-alicloud#45 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to this issue and let us know.

@bhordupur
Copy link
Author

Hi, Yes you are right and alicloud fixed that issue. Thanks

@ghost
Copy link

ghost commented Apr 5, 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 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants