You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
Currently, SecretHub directories can only be created from the CLI or the Golang SDK. By adding support for the secrethub_dir resource to the provider, users can create SecretHub directories from within Terraform.
Some challenges that still have to be tackled:
What happens when a user deletes a directory created in Terraform, but containing secrets that were created outside of Terraform?
How do we handle the dependency of a secret on its directory: deleting or changing the path of a directory in TF should inform the user that all the containing Terraformed secrets are deleted.
Can we implement this in a way that is forward compatible with a possible future function to move directories?
The first one could be solved by only allowing the deletion of empty directories and returning an error when this is not the case. The latter two can probably be tackled by changing the API to return the UUID of a directory and using it as the ID of the secrethub_dir resource.
The text was updated successfully, but these errors were encountered:
I've tackled the challenges mentioned in this ticket in the following way:
Deletion of non-empty directories is only allowed when force_destroy is set to true. Similar to the same option on AWS S3 bucket resource
The path field has ForceNew specified. The plan will show how this cascades through to other resources.
Secret resources currently use a path to specify in what directory secrets are created. To make secret resource compatible with move functionality, we'd have to make a breaking change, changing the dependency between secret and it's directory to be ID based. We don't want to make this breaking change right now. When we do, we can simultaneously change the dependency between directories themselves.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently, SecretHub directories can only be created from the CLI or the Golang SDK. By adding support for the
secrethub_dir
resource to the provider, users can create SecretHub directories from within Terraform.Some challenges that still have to be tackled:
The first one could be solved by only allowing the deletion of empty directories and returning an error when this is not the case. The latter two can probably be tackled by changing the API to return the UUID of a directory and using it as the ID of the
secrethub_dir
resource.The text was updated successfully, but these errors were encountered: