Coder Social home page Coder Social logo

dockerfile-terraforming's Introduction

Terraforming Docker Image

Build Status Dependency Status Docker Repository on Quay.io MIT License

Docker Image for Terraforming. Please see Terraforming Github repository for more information about Terraforming.

Image Repository

quay.io/dtan4/terraforming

Supported Tags

  • latest
    • Ruby 2.4.2
    • Terraforming 0.16.0

Usage

$ docker run \
    --rm \
    -e AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX \
    -e AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
    -e AWS_DEFAULT_REGION=xx-yyyy-0 \
    quay.io/dtan4/terraforming:latest \
    terraforming help

License

MIT License

dockerfile-terraforming's People

Contributors

dtan4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dockerfile-terraforming's Issues

AuthFailure when using terraforming in Docker

Calling terraforming in docker fails, but the same exact credentials in Mac OS X work correctly:

$ docker run --rm --name terraforming -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION=us-east-1 quay.io/dtan4/terraforming:latest terraforming ec2
/usr/local/bundle/gems/aws-sdk-core-2.9.9/lib/seahorse/client/plugins/raise_response_errors.rb:15:in call': AWS was not able to validate the provided access credentials (Aws::EC2::Errors::AuthFailure) from /usr/local/bundle/gems/aws-sdk-core-2.9.9/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in call'
from /usr/local/bundle/gems/aws-sdk-core-2.9.9/lib/aws-sdk-core/plugins/idempotency_token.rb:18:in call' from /usr/local/bundle/gems/aws-sdk-core-2.9.9/lib/aws-sdk-core/plugins/param_converter.rb:20:in call'
from /usr/local/bundle/gems/aws-sdk-core-2.9.9/lib/aws-sdk-core/plugins/response_paging.rb:26:in call' from /usr/local/bundle/gems/aws-sdk-core-2.9.9/lib/seahorse/client/plugins/response_target.rb:21:in call'
from /usr/local/bundle/gems/aws-sdk-core-2.9.9/lib/seahorse/client/request.rb:70:in send_request' from /usr/local/bundle/gems/aws-sdk-core-2.9.9/lib/seahorse/client/base.rb:207:in block (2 levels) in define_operation_methods'
from /usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/resource/ec2.rb:108:in instances' from (erb):1:in apply_template'
from /usr/local/lib/ruby/2.4.0/erb.rb:896:in eval' from /usr/local/lib/ruby/2.4.0/erb.rb:896:in result'
from /usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/util.rb:4:in apply_template' from /usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/resource/ec2.rb:19:in tf'
from /usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/resource/ec2.rb:7:in tf' from /usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/cli.rb:240:in tf'
from /usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/cli.rb:227:in execute' from /usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/cli.rb:44:in ec2'
from /usr/local/bundle/gems/thor-0.19.4/lib/thor/command.rb:27:in run' from /usr/local/bundle/gems/thor-0.19.4/lib/thor/invocation.rb:126:in invoke_command'
from /usr/local/bundle/gems/thor-0.19.4/lib/thor.rb:369:in dispatch' from /usr/local/bundle/gems/thor-0.19.4/lib/thor/base.rb:444:in start'
from /usr/local/bundle/gems/terraforming-0.13.2/bin/terraforming:5:in <top (required)>' from /usr/local/bundle/bin/terraforming:17:in load'
from /usr/local/bundle/bin/terraforming:17:in `

'
f45c89b04cf3:~ lukey$ terraforming ec2
resource "aws_instance" "master-us-east-1c-masters-k8s-aws-stacks-space" {
ami = "ami-4bb3e05c"
...

Request to update version of terraforming

Please update the version of terraforming used in this Docker image to 0.12.0 or set it so that it will always target the latest build of terraforming. Your terraforming software is great and so having access to an up to date Docker image with the latest version in it would be awesome.

Error when requesting `iamr` IAM Roles

Description

From executing the blow command on WIndows 10, I get the error uninitialized class variable. I tried a number of other iam specific calls, and all seem to be okay.

And I probably shouldn't have raised this in this repo... sorry about that.

Command

docker run --rm --name terraforming ^
    -e AWS_ACCESS_KEY_ID=%AWS_ACCESS_KEY_ID% ^
    -e AWS_SECRET_ACCESS_KEY=%AWS_SECRET_ACCESS_KEY% ^
    -e AWS_REGION=eu-west-1 ^
    quay.io/dtan4/terraforming ^
    terraforming iamr

Exception

/usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/util.rb:21:in `unescape': uninitialized class variable @@accept_charset in #<Class:CGI> (NameError)
Did you mean?  @@accept_charset
        from /usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/util.rb:21:in `prettify_policy'
        from (erb):6:in `block in apply_template'
        from (erb):1:in `each'
        from (erb):1:in `apply_template'
        from /usr/local/lib/ruby/2.4.0/erb.rb:896:in `eval'
        from /usr/local/lib/ruby/2.4.0/erb.rb:896:in `result'
        from /usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/util.rb:4:in `apply_template'
        from /usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/resource/iam_role.rb:19:in `tf'
        from /usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/resource/iam_role.rb:7:in `tf'
        from /usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/cli.rb:240:in `tf'
        from /usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/cli.rb:227:in `execute'
        from /usr/local/bundle/gems/terraforming-0.13.2/lib/terraforming/cli.rb:104:in `iamr'
        from /usr/local/bundle/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
        from /usr/local/bundle/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
        from /usr/local/bundle/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
        from /usr/local/bundle/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
        from /usr/local/bundle/gems/terraforming-0.13.2/bin/terraforming:5:in `<top (required)>'
        from /usr/local/bundle/bin/terraforming:17:in `load'
        from /usr/local/bundle/bin/terraforming:17:in `<main>'

please support using the --profile and --region parameter

in other word, I would like to use this

docker run
--rm
--name terraforming
quay.io/dtan4/terraforming:latest
terraforming --profile=default --region=us-west-2 s3

instead of this
docker run
--rm
--name terraforming
-e AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxx
-e AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxx
-e AWS_DEFAULT_REGION=us-west-2
quay.io/dtan4/terraforming:latest
terraforming "$@"

Where the default profile is stored in ~/.aws/config and ~/.aws/credential

So I don't have to expose my credential in a script.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.