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 #45

Closed
hashibot opened this issue Dec 7, 2017 · 1 comment

Comments

@hashibot
Copy link

hashibot commented Dec 7, 2017

This issue was originally opened by @bhordupur as hashicorp/terraform#16857. It was migrated here as a result of the provider split. The original body of the issue is below.


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

@catsby
Copy link
Contributor

catsby commented Jan 19, 2018

hashicorp/terraform#16857 (comment) suggests this is no longer an issue, so I'm going to close for now. Please let us know if this is still problem!

@catsby catsby closed this as completed Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants