Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Terraform AWS plugin Doc: it is not clear where to configure AWS related credential #210

Open
linsun opened this issue Oct 10, 2016 · 4 comments
Labels

Comments

@linsun
Copy link
Contributor

linsun commented Oct 10, 2016

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.

@linsun
Copy link
Contributor Author

linsun commented Oct 12, 2016

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.

@anonymuse
Copy link
Contributor

anonymuse commented Oct 12, 2016

@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.

@linsun
Copy link
Contributor Author

linsun commented Oct 12, 2016

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.

@wfarner wfarner added the docs label Oct 13, 2016
@wfarner
Copy link
Contributor

wfarner commented Oct 14, 2016

Sounds like some progress was made here. Anything that should be fed back into docs?

chungers pushed a commit to chungers/infrakit that referenced this issue Sep 30, 2017
…onvention (docker-archive#210)

* Shorter output; move files to conform to convention

* Incorporated PR207 and removed extra output

* Remove extra file (emacs backup); added exclusion in .gitignore

* Restore deleted rules in .gitignore after bad merge conflict resolve
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants