--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/756c7550-eebd-43e7-9900-ab40d5d69627%40googlegroups.com.
Hi David,
Thanks for your response. Yes, for now I am just trying to log into the instances just created.
I tried going with option 1 you had outlined. As in I went through the following steps:
- Generated a key pair and downloaded it. Note: It downloaded as *.pem file and not *.pub
- Saved the file in my folder
- Defined the resources in .tf file as mentioned below and ran terraform apply on it.
resource "aws_instance" "example" {
ami = "ami-69febd09"
instance_type = "t2.nano"
key_name = "access"
}
resource "aws_key_pair" "access" {
key_name = "access"
public_key = "${file("mykeypair.pem")}"
}
I get the following error message:
2 error(s) occurred:
* aws_key_pair.access: Error import KeyPair: InvalidParameterValue: Value (XXXX) for parameter PublicKeyMaterial is invalid. Length exceeds maximum of 2048.
Is this because I am using a *.pem file instead of *.pub? How should I convert it?
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/756c7550-eebd-43e7-9900-ab40d5d69627%40googlegroups.com.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/4244294f-25a4-4c78-9785-706286d96790%40googlegroups.com.