Skip to content

Commit ad8c475

Browse files
committed
Update readme
1 parent 9a8c67a commit ad8c475

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

tools/ghsecrets/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,40 +30,40 @@ By default, `ghsecrets set` assumes you want to store secrets in AWS Secrets Man
3030
> **⚠️ Note:** Ensure you authenticate with AWS before using the tool:
3131
>
3232
> ```sh
33-
> aws sso login --profile <your-aws-profile>
33+
> aws sso login --profile <your-aws-sdlc-profile>
3434
> ```
35-
> By default, use the SDLC profile
35+
> Use the **SDLC** profile in AWS
3636
3737
This will read from `~/.testsecrets` (by default) and create/update a secret in AWS Secrets Manager:
3838
3939
```sh
40-
ghsecrets set --profile <your-aws-profile>
40+
ghsecrets set --profile <your-aws-sdlc-profile>
4141
```
4242
4343
If you’d like to specify a different file:
4444

4545
```sh
46-
ghsecrets set --file /path/to/mysecrets.env --profile <your-aws-profile>
46+
ghsecrets set --file /path/to/mysecrets.env --profile <your-aws-sdlc-profile>
4747
```
4848

4949
If you’d like to specify a custom secret name:
5050

5151
```sh
52-
ghsecrets set --secret-id my-custom-secret --profile <your-aws-profile>
52+
ghsecrets set --secret-id my-custom-secret --profile <your-aws-sdlc-profile>
5353
```
5454

5555
Note: For AWS backend, the tool automatically adds the `testsecrets/` prefix if it is missing. This ensures consistency and allows GitHub Actions to access all secrets with this designated prefix.
5656

5757
If you’d like to share this secret with additional AWS IAM principals (e.g., a collaborator’s account):
5858

5959
```sh
60-
ghsecrets set --shared-with arn:aws:iam::123456789012:role/SomeRole --profile <your-aws-profile>
60+
ghsecrets set --shared-with arn:aws:iam::123456789012:role/SomeRole --profile <your-aws-sdlc-profile>
6161
```
6262

6363
You can specify multiple ARNs using commas:
6464

6565
```sh
66-
ghsecrets set --shared-with arn:aws:iam::123456789012:role/SomeRole,arn:aws:iam::345678901234:root --profile <your-aws-profile>
66+
ghsecrets set --shared-with arn:aws:iam::123456789012:role/SomeRole,arn:aws:iam::345678901234:root --profile <your-aws-sdlc-profile>
6767
```
6868

6969
#### b) Set secrets in GitHub
@@ -82,13 +82,13 @@ This will:
8282
If you want to retrieve an existing secret from AWS Secrets Manager, use:
8383

8484
```sh
85-
ghsecrets get --secret-id testsecrets/MySecretName --profile <your-aws-profile>
85+
ghsecrets get --secret-id testsecrets/MySecretName --profile <your-aws-sdlc-profile>
8686
```
8787

8888
By default, it prints out the Base64-encoded string. To decode it automatically:
8989

9090
```sh
91-
ghsecrets get --secret-id testsecrets/MySecretName --decode --profile <your-aws-profile>
91+
ghsecrets get --secret-id testsecrets/MySecretName --decode --profile <your-aws-sdlc-profile>
9292
```
9393

9494
## FAQ

tools/ghsecrets/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ func handleAWSSSOError(err error) error {
312312
if strings.Contains(err.Error(), "SSO session has expired") || strings.Contains(err.Error(), "InvalidGrantException") {
313313
return fmt.Errorf(
314314
"AWS SSO session has expired or is invalid. Please re-authenticate by running:\n\n"+
315-
" aws sso login --profile <your-profile>\n\n"+
316-
"Then try again with --profile <your-profile> flag.\n\nOriginal error: %w",
315+
" aws sso login --profile <your-sdlc-profile>\n\n"+
316+
"Then try again with --profile <your-sdlc-profile> flag.\n\nOriginal error: %w",
317317
err,
318318
)
319319
}

0 commit comments

Comments
 (0)