Skip to content

Commit 6adb667

Browse files
authored
secrets remove all option (#8293)
1 parent 4d406ad commit 6adb667

File tree

2 files changed

+17
-1
lines changed
  • src/pages/[platform]

2 files changed

+17
-1
lines changed

src/pages/[platform]/deploy-and-host/sandbox-environments/features/index.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,22 @@ value: abc123
8686
lastUpdated: Mon Nov 13 2023 22:19:12 GMT-0800 (Pacific Standard Time)
8787
```
8888

89-
### Remove secrets
89+
### Remove secret
9090

9191
To remove a secret from from the sandbox, run the following command in your terminal:
9292

9393
```bash
9494
npx ampx sandbox secret remove foo
9595
```
9696

97+
### Remove all secrets
98+
99+
To remove all secrets from the sandbox, run the following command in your terminal:
100+
101+
```bash
102+
npx ampx sandbox secret remove --all
103+
```
104+
97105
### Reference secrets
98106

99107
Once you have set a secret, you can reference the secret in your backend definition using the `secret()` function. The following example shows how to set up social sign-in with authentication in your app. Depending on your environment, Amplify will automatically load the correct secret value.

src/pages/[platform]/reference/cli-commands/index.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,14 @@ If you want to remove a secret you previously set, use `sandbox secret remove`:
174174
npx ampx sandbox secret remove LOGINWITHAMAZON_CLIENT_ID
175175
```
176176

177+
#### Removing all secrets
178+
179+
If you want to remove all secrets you previously set, use `sandbox secret remove --all`:
180+
181+
```bash title="Terminal" showLineNumbers={false}
182+
npx ampx sandbox secret remove --all
183+
```
184+
177185
#### Listing secrets
178186

179187
List all available secrets for your personal sandbox in the default AWS profile and Region:

0 commit comments

Comments
 (0)