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

[ibm_sm_arbitrary_secret] Allow updating of existing certificate #4465

Closed
alex-reiff opened this issue Mar 31, 2023 · 2 comments
Closed

[ibm_sm_arbitrary_secret] Allow updating of existing certificate #4465

alex-reiff opened this issue Mar 31, 2023 · 2 comments
Assignees
Labels
enhancement service/Secrets Manager Issues related to Secrets Manager

Comments

@alex-reiff
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

We have a use case where we update the payload of an existing secret. Here's how we do it with the REST API provider:

resource "restapi_object" "update_secret_payload" {
  path           = "${local.secrets_manager_endpoint}/api/v1/secrets/arbitrary/${var.secret_id}?action=rotate"
  data           = "{\"payload\": \"${local.api_key}\"}"
  create_method  = "POST"
  create_path    = "${local.secrets_manager_endpoint}/api/v1/secrets/arbitrary/${var.secret_id}?action=rotate"
  update_method  = "POST"
  update_path    = "${local.secrets_manager_endpoint}/api/v1/secrets/arbitrary/${var.secret_id}?action=rotate"
  destroy_method = "GET"
  destroy_path   = "${local.secrets_manager_endpoint}/api/v1/secrets/arbitrary/${var.secret_id}"
  force_new      = [var.region, var.secrets_manager_guid]
  read_path      = "${local.secrets_manager_endpoint}/api/v1/secrets/arbitrary/${var.secret_id}"
  object_id      = var.secret_id
  id_attribute   = "resources/0/id"
}

This intentionally does nothing during terraform destroy to keep the secret intact.

We have not found a way to recreate this behavior using the IBM provider.

New or Affected Resource(s)

  • ibm_sm_arbitrary_secret

Potential Terraform Configuration

Terraform v1.4.4
IBM provider v1.51.0

References

  • #0000
@github-actions github-actions bot added the service/Secrets Manager Issues related to Secrets Manager label Mar 31, 2023
@idohubara
Copy link

We are working on this capability and it is planned to be a part of the next release

@IdanAdar
Copy link
Collaborator

PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement service/Secrets Manager Issues related to Secrets Manager
Projects
None yet
Development

No branches or pull requests

4 participants