Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secret Store: Support PUT & PATCH methods when creating secret #433

Merged
merged 1 commit into from May 11, 2023

Conversation

awilliams-fastly
Copy link
Collaborator

The method controls the behavior when creating a secret with a name that already exists in the store.

  • POST: Default. Create a secret and error if one already exists with the same name.
  • PUT: Create or recreate a secret.
  • PATCH: Recreate a secret and error if one does not already exist with the same name.

The method controls the behavior when creating a secret with a
name that already exists in the store.

- `POST`:  Default. Create a secret and error if one already exists with the same name.
- `PUT`:   Create or recreate a secret.
- `PATCH`: Recreate a secret and error if one does not already exist with the same name.
awilliams-fastly added a commit to fastly/cli that referenced this pull request May 10, 2023
This works in combination with
fastly/go-fastly#433 which adds support for the
`CreateSecretInput.Method` field.

Secret names must be unique within a store.
The method effects how duplicate names are handled:

- `POST`:  Default. Create a secret and error if one already exists with the same name.
- `PUT` / `--recreate`:   Create or recreate a secret.
- `PATCH` / `--recreate-must`: Recreate a secret and error if one does not already exist with the same name.
@Integralist Integralist merged commit 3a3e724 into main May 11, 2023
2 checks passed
@Integralist Integralist deleted the awilliams/secret-store-add-methods branch May 11, 2023 10:18
awilliams-fastly added a commit to fastly/cli that referenced this pull request May 26, 2023
This works in combination with
fastly/go-fastly#433 which adds support for the
`CreateSecretInput.Method` field.

Secret names must be unique within a store.
The method effects how duplicate names are handled:

- `POST`:  Default. Create a secret; error if one already exists with the same name.
- `PUT` / `--recreate`:   Create or recreate a secret.
- `PATCH` / `--recreate-must`: Recreate a secret and error if one does not already exist with the same name.
awilliams-fastly added a commit to fastly/cli that referenced this pull request May 26, 2023
This works in combination with fastly/go-fastly#433 which adds support for the `CreateSecretInput.Method` field.

Secret names must be unique within a store. The method effects how duplicate names are handled:

- `POST`:  Default. Create a secret; error if one already exists with the same name.
- `PUT` / `--recreate-allow`:   Create or recreate a secret.
- `PATCH` / `--recreate`: Recreate a secret and error if one does not already exist with the same name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants