-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from Cox-Automotive/develop
Develop
- Loading branch information
Showing
7 changed files
with
151 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Data Source: alks_keys | ||
|
||
Returns credentials for a given AWS account using ALKS. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
data "alks_keys" "account_keys" { | ||
providers: alks.my_alias | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
* Note: This does not take any arguments. See below. | ||
|
||
## Attribute Reference | ||
|
||
* `access_key` - Generated access key for the specified provider. If multiple providers, it takes the `provider` field. Otherwise, uses the initial provider. | ||
* `secret_key` - Generated secret key for the specified provider. If multiple providers, it takes the `provider` field. Otherwise, uses the initial provider. | ||
* `session_token` - Generated session token for the specified provider. If multiple providers, it takes the `provider` field. Otherwise, uses the initial provider. | ||
* `account` - The account number of the returned keys. | ||
* `role` - The role from the returned keys. | ||
|
||
|
||
## How it works | ||
- Whatever your default provider credentials are, will be used. If multiple providers have been configured, then one can point the data source to return keys for specific providers using `providers` field with an explicit alias. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
page_title: "Example usage of ALKS TFP" | ||
--- | ||
|
||
## Example | ||
|
||
See [this example](https://github.com/Cox-Automotive/terraform-provider-alks/blob/master/examples/alks.tf) for a basic Terraform script which: | ||
|
||
1. Creates an AWS provider and ALKS provider | ||
- Note: There are two ALKS / AWS providers to showcase multi-provider configuration in use. | ||
2. Creates an IAM role via the ALKS provider | ||
3. Attaches a policy to the created role using the AWS provider | ||
4. Creates an LTK user via the ALKS provider. | ||
|
||
This example is intended to show how to combine a typical AWS Terraform script with the ALKS provider to automate the creation of IAM roles and other infrastructure. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
page_title: "Local Installation" | ||
--- | ||
|
||
### Terraform Version < 0.13 Local Installation | ||
* Download and install [Terraform](https://www.terraform.io/intro/getting-started/install.html) | ||
|
||
* Download ALKS Provider binary for your platform from [Releases](https://github.com/Cox-Automotive/terraform-provider-alks/releases) | ||
|
||
For example on macOS: | ||
|
||
``` | ||
curl https://github.com/Cox-Automotive/terraform-provider-alks/releases/download/1.5.0/terraform-provider-alks_1.5.0_darwin_amd64.zip -O -J -L | unzip | ||
``` | ||
|
||
* Configure Terraform to use this plugin by placing the binary in `.terraform.d/plugins/` on MacOS/Linux or `terraform.d\plugins\` in your user's "Application Data" directory on Windows. | ||
|
||
* Note: If you've used a previous version of the ALKS provider and created a `.terraformrc` file in your home directory you'll want to remove it prior to updating. | ||
|
||
### Terraform Version >= 0.13 Local Installation | ||
* Download and install [Terraform](https://www.terraform.io/intro/getting-started/install.html) | ||
|
||
* Download ALKS Provider binary for your platform from [Releases](https://github.com/Cox-Automotive/terraform-provider-alks/releases) | ||
|
||
For example on macOS: | ||
|
||
``` | ||
curl https://github.com/Cox-Automotive/terraform-provider-alks/releases/download/1.5.0/terraform-provider-alks_1.5.0_darwin_amd64.zip -O -J -L | unzip | ||
``` | ||
|
||
* Go into the Terraform plugins path; `.terraform.d/plugins/` on MacOS/Linux or `terraform.d\plugins\` in your user's "Application Data" directory on Windows. | ||
|
||
* Create the following directories: `coxautoinc.com/engineering-enablement/alks/1.5.0/<OS>_<ARCH>` and put the binary into the `<OS>_<ARCH>/` directory. | ||
* Note: This `<OS>_<ARCH>` will vary depending on your system. For example, 64-bit MacOS would be: `darwin_amd64` while 64-bit Windows 10 would be: `windows_amd64` | ||
|
||
* Finally, configure Terraform. | ||
* In your `versions.tf` or `main.tf` file you'll want to add the new ALKS provider as such: | ||
``` | ||
terraform { | ||
required_version = ">= 0.13" | ||
required_providers { | ||
alks = { | ||
source = "coxautoinc.com/engineering-enablement/alks" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
* Note: If you've previously installed our provider and it is stored in your remote state, you may need to run the [`replace-provider` command](https://www.terraform.io/docs/commands/state/replace-provider.html). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters