Skip to content

Commit 2fbc911

Browse files
authored
Merge pull request #14 from tonedefdev/rc-2.1.1
Release 2.1.1
2 parents 42be312 + 93c7fb8 commit 2fbc911

File tree

4 files changed

+49
-9
lines changed

4 files changed

+49
-9
lines changed

LICENSE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2022 Anthony Owens
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

README.md

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,33 @@ We all know storing secrets in plain text can pose major security threats, and T
2525
- [x] Terraform Cloud
2626
- [x] Terraform Enterprise
2727

28+
## Quick Links
29+
- Install & Configure
30+
- [Windows](https://github.com/tonedefdev/terracreds#windows-install-via-chocolatey)
31+
- [macOS](https://github.com/tonedefdev/terracreds#macos-install)
32+
- [Linux](https://github.com/tonedefdev/terracreds#linux-install)
33+
- [From Source](https://github.com/tonedefdev/terracreds#install-from-source)
34+
- [Upgrading](https://github.com/tonedefdev/terracreds#upgrading)
35+
- [Initial Configuration](https://github.com/tonedefdev/terracreds#initial-configuration)
36+
- Usage
37+
- [Storing](https://github.com/tonedefdev/terracreds#storing-credentials)
38+
- [Verifying](https://github.com/tonedefdev/terracreds#storing-credentials)
39+
- [Updating](https://github.com/tonedefdev/terracreds#updating-credentials)
40+
- [Forgetting](https://github.com/tonedefdev/terracreds#forgetting-credentials)
41+
- [Listing](https://github.com/tonedefdev/terracreds#list-credentials)
42+
- Vault Providers
43+
- [General Setup](https://github.com/tonedefdev/terracreds#setting-up-a-vault-provider)
44+
- [AWS Secrets Manager](https://github.com/tonedefdev/terracreds#aws-secrets-manager)
45+
- [Azure Key Vault](https://github.com/tonedefdev/terracreds#azure-key-vault)
46+
- [Google Secret Manager](https://github.com/tonedefdev/terracreds#google-secret-manager)
47+
- [HashiCorp Vault](https://github.com/tonedefdev/terracreds#hashicorp-vault)
48+
- Miscellaneous
49+
- [Protection](https://github.com/tonedefdev/terracreds#protection)
50+
- [Logging](https://github.com/tonedefdev/terracreds#logging)
51+
- Troubleshooting
52+
- [Known Issues](https://github.com/tonedefdev/terracreds#known-issues)
53+
- [Linux](https://github.com/tonedefdev/terracreds#linux)
54+
2855
## Windows Install via Chocolatey
2956
The fastest way to install `terracreds` on Windows is via our Chocolatey package:
3057
```powershell
@@ -125,16 +152,16 @@ credentials_helper "terracreds" {
125152
}
126153
```
127154

128-
Once you have moved all of your tokens from this file to the `Windows Credential Manager` or `KeyChain` via `terracreds` you can remove the tokens from the file. If you don't remove the tokens, and you add the `credentials_helper` block to this file, Terraform will still use the tokens instead of `terracreds` to retreive the tokens, so be sure to remove your tokens from this file once you have used the `create` or `terraform login` command to create the credentials in `terracreds` so you can actually leverage the credential helper.
155+
Once you have moved all of your tokens from this file to your preferred vault provider via `terracreds` you can remove the tokens from the file. If you don't remove them, but you add the `credentials_helper` block to this file, Terraform will still use the token from this file instead of from the vault configured with `terracreds`.
129156

130157
## Storing Credentials
131-
For Terraform to properly use the credentials stored in your credential manager they need to be stored a specific way. The name of the credential object must be the domain name of the Terraform Automation and Collaboration server. For instance `app.terraform.io` which is the default name `terraform login` will leverage.
158+
For Terraform to properly use the credentials stored in your credential manager they need to be stored a specific way. The name of the credential object must be the domain name of the Terraform Cloud or Enterprise server. For instance `app.terraform.io` which is the default name `terraform login` will leverage.
132159

133-
The value for the password will correspond to the API token associated for that specific Terraform Automation and Collaboration server.
160+
The value for the password will correspond to the API token associated for that specific Terraform Cloud or Enterprise server.
134161

135-
The entire process is kicked off directly from the Terraform CLI. Run `terraform login` to start the login process with Terraform Cloud. If you're using Terraform Enterprise or another Terraform Automation and Collaboration Software solution you'll need to pass the hostname of the server as an additional argument `terraform login my.tacos.com`.
162+
The entire process is kicked off directly from the Terraform CLI. Run `terraform login` to start the login process with Terraform Cloud. If you're using Terraform Enterprise you'll need to pass the hostname of the server as an additional argument `terraform login my.tfe.com`.
136163

137-
You'll be sent to your Terraform Automation and Collaboration Software instance where you'll be requested to sign-in with your account, and then sent to create an API token. Create the API token with any name you'd like for this example we'll use `terracreds`.
164+
You'll be sent to your Terraform Cloud or Enterprise Software instance where you'll be requested to sign-in with your account, and then sent to create an API token. Create the API token with any name you'd like for this example we'll use `terracreds`.
138165

139166
Once completed, copy the generated token, paste it into your terminal, and then hit enter. Terraform will then leverage `terracreds` to store the credentials in the operating system's credential manager. If all went well you should receive the following success message:
140167

@@ -148,7 +175,7 @@ In the background `terraform` calls `terracreds` as its credential helper, `terr
148175
terraform-credentials-terracreds store app.terraform.io
149176
```
150177

151-
If you prefer, you can also perform creating credentials manually by running:
178+
If you prefer, you can also create credentials manually by running:
152179
```bash
153180
terracreds create -n app.terraform.io -v <TACOS_API_TOKEN>
154181
```
@@ -233,7 +260,7 @@ The above example would maintain the dash `[-]` in the outuput of the formatted
233260
Additionally, you can use `--as-json` to return the secret names and values as a JSON string. This is printed to standard output so you can make use of shell pipes and other commands to ingest the data.
234261

235262
## Setting Up a Vault Provider
236-
> You can reference example configs in our [repo](https://github.com/tonedefdev/terracreds/blob/main/config.yaml) plus we have example [terraform](https://github.com/tonedefdev/terracreds/tree/main/terraform) code you can reference in order to setup your `AWS` or `Azure` VMs to use `terracreds` for a CI/CD piepline agent or a development workstation.
263+
> We have example [terraform](https://github.com/tonedefdev/terracreds/tree/main/terraform) code you can reference in order to setup your `AWS` or `Azure` VMs to use `terracreds` for a CI/CD piepline agent or a development workstation.
237264
238265
> New in version `2.1.0`
239266

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ func main() {
646646
},
647647
Action: func(c *cli.Context) error {
648648
if len(os.Args) == 2 {
649-
fmt.Fprintf(color.Output, "%s: No list command was specified. Use 'terracreds create -h' to print help info\n", color.RedString("ERROR"))
649+
fmt.Fprintf(color.Output, "%s: No list command was specified. Use 'terracreds list -h' to print help info\n", color.RedString("ERROR"))
650650
return nil
651651
}
652652

terraform/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ variable "location" {
1212

1313
variable "keyvault_only" {
1414
type = bool
15-
default = true
15+
default = false
1616
description = "Create only the Azure Key Vault resources and not any VMs"
1717
}
1818

0 commit comments

Comments
 (0)