Skip to content

Commit

Permalink
Merge pull request #68 from Cox-Automotive/develop
Browse files Browse the repository at this point in the history
Merge Develop to Master
  • Loading branch information
ntangy authored Nov 4, 2019
2 parents 96fed0d + 90ee1a2 commit e649a98
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ This module is used for creating IAM Roles via the ALKS API.

* Download ALKS Provider binary for your platform from [Releases](https://github.com/Cox-Automotive/terraform-provider-alks/releases)

For example on macOS:

```
curl -L https://github.com/Cox-Automotive/terraform-provider-alks/releases/download/1.3.0/terraform-provider-alks-darwin-amd64.tar.gz | tar zxv
```
Expand All @@ -36,7 +38,7 @@ The ALKS provider offers a flexible means of providing authentication credential

Static credentials can be provided via an `access_key`, `secret_key` and `token` in-line in the ALKS provider block. This method is generally not recommended, since the credentials could accidentally be committed or shared.

```
```tf
provider "alks" {
url = "https://alks.foo.com/rest"
version = "~> 1.3.0"
Expand All @@ -50,14 +52,14 @@ provider "alks" {

You can provide your credentials via the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_SESSION_TOKEN` environment variables. If you need to pass multiple AWS credentials (when using a combination of Roles, like `PowerUser` and `IAMAdmin`) you can use the `ALKS_` prefix in place of `AWS_` (ex: `ALKS_ACCESS_KEY_ID`) as these are prioritized over the `AWS_` prefixed environment varaibles for the provider.

```
```tf
provider "alks" {
url = "https://alks.foo.com/rest"
version = "~> 1.3.0"
}
```

```
```console
$ alks sessions open -i
$ export AWS_ACCESS_KEY_ID="accesskey"
$ export AWS_SECRET_ACCESS_KEY="secretkey"
Expand All @@ -69,7 +71,7 @@ $ terraform plan

You can use an AWS credentials file to specify your credentials. The default location is `$HOME/.aws/credentials` on Linux and OSX, or `"%USERPROFILE%\.aws\credentials"` for Windows users. If we fail to detect credentials inline, or in the environment, Terraform will check this location last. You can optionally specify a different location in the configuration via the `shared_credentials_file` attribute, or via the environment with the `AWS_SHARED_CREDENTIALS_FILE` variable. This method also supports a profile configuration and matching `AWS_PROFILE` environment variable.

```
```tf
provider "alks" {
url = "https://alks.foo.com/rest"
version = "~> 1.3.0"
Expand All @@ -88,7 +90,7 @@ The STS credentials are used and provided in the same way that the AWS CLI uses

Your ALKS provider block can look just like this:

```
```tf
provider "alks" {
url = "https://alks.foo.com/rest"
version = "~> 1.3.0"
Expand All @@ -97,7 +99,7 @@ provider "alks" {

Since Machine Identities work with Instance Profile Metadata directly, it can be helpful to assume another role or cross account trust. For example:

```
```tf
provider "alks" {
url = "https://alks.foo.com/rest"
version = "~> 1.3.0"
Expand Down Expand Up @@ -127,7 +129,7 @@ Provider Options:

#### `alks_iamrole`

```
```tf
resource "alks_iamrole" "test_role" {
name = "My_Test_Role"
type = "Amazon EC2"
Expand All @@ -148,7 +150,7 @@ Value | Type | Forces New | Value Type | Descrip

#### `alks_iamtrustrole`

```
```tf
resource "alks_iamtrustrole" "test_trust_role" {
name = "My_Cross_Test_Role"
type = "Cross Account"
Expand Down Expand Up @@ -186,7 +188,7 @@ Set up a [GOPATH](http://golang.org/doc/code.html#GOPATH) and add `$GOPATH/bin`

Clone this repository into `$GOPATH/src/github.com/Cox-Automotive/terraform-provider-alks`. All the necessary dependencies are either vendored or automatically installed (using [Godep](https://github.com/tools/godep)), so type `make build test`. This will compile the code and then run the tests. If this exits with exit status `0`, then everything is working! Check your `examples` directory for an example Terraform script and the generated binary.

```
```bash
cd "$GOPATH/src/github.com/Cox-Automotive/terraform-provider-alks"
make build test
```
Expand Down

0 comments on commit e649a98

Please sign in to comment.