deploykit
deploykit copied to clipboard
Terraform AWS plugin Doc: it is not clear where to configure AWS related credential
I have been following the demo: https://github.com/docker/infrakit/blob/master/example/instance/terraform/cattle_demo.md
I saw the 3 instance-*.tf.json file created in my was-two-tier folder but I'm missing the docs on how do I configure my AWS to deploy these onto my AWS. I believe just the json plan file is generated but i don't see how to configure the deployment to AWS. Would be great to get this clarified.
Curious if this is supplied in a third file like .tfvar file or env vars.... I don't see the terraform instance plugin code takes the -var-file as the param.
@linsun, I made sure to put my SSH keypair here and here in the key_name
field. I used the name of the keypair in the AWS control panel:
{
"Properties" : {
"type" : "aws_instance",
"value" : {
"ami" : "${lookup(var.aws_amis, var.aws_region)}",
"instance_type" : "m1.small",
"key_name": "PUBKEY",
"vpc_security_group_ids" : ["${aws_security_group.default.id}"],
"subnet_id": "${aws_subnet.default.id}",
"tags" : {
"Tier" : "web",
"InstancePlugin" : "terraform"
},
"connection" : {
"user" : "ubuntu"
}
}
},
I believe I also needed to make sure that my ssh-agent
has the SSH key available to it in order to connect to the servers afterward. Not 100% sure about that.
Thank you @anonymuse! Ah, I didn't realize that key_name is the only thing needed for applying terraform AWS plan. yes, i am curious on the ssh key too, i would think that should be specified in the connection blob.
Sounds like some progress was made here. Anything that should be fed back into docs?