--- # generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "{{.Type}} {{.Name}} - {{.ProviderName}}" subcategory: "" description: |- {{ .Description | plainmarkdown | trimspace | prefixlines " " }} --- # {{.Type}} ({{.Name}}) {{ .Description | trimspace }} ## Example Usage ### Basic {{tffile "examples/resources/docker_secret/resource-basic.tf"}} ### Update secret with no downtime To update a `secret`, Terraform will destroy the existing resource and create a replacement. To effectively use a `docker_secret` resource with a `docker_service` resource, it's recommended to specify `create_before_destroy` in a `lifecycle` block. Provide a unique `name` attribute, for example with one of the interpolation functions `uuid` or `timestamp` as shown in the example below. The reason is [moby-35803](https://github.com/moby/moby/issues/35803). {{tffile "examples/resources/docker_secret/resource-no-downtime.tf"}} {{ .SchemaMarkdown | trimspace }} ## Import Import is supported using the following syntax: {{codefile "shell" "examples/resources/docker_secret/import.sh" }}