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

feat: Add triggers attribute to docker_registry_image #496

Merged
merged 1 commit into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/resources/registry_image.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ resource "docker_registry_image" "helloworld" {
- `build` (Block List, Max: 1) Definition for building the image (see [below for nested schema](#nestedblock--build))
- `insecure_skip_verify` (Boolean) If `true`, the verification of TLS certificates of the server/registry is disabled. Defaults to `false`
- `keep_remotely` (Boolean) If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker registry on destroy operation. Defaults to `false`
- `triggers` (Map of String) A map of arbitrary strings that, when changed, will force the `docker_registry_image` resource to be replaced. This can be used to rebuild an image when contents of source code folders change or to repush a local image

### Read-Only

Expand Down
7 changes: 7 additions & 0 deletions internal/provider/resource_docker_registry_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,13 @@ func resourceDockerRegistryImage() *schema.Resource {
},
},

"triggers": {
Description: "A map of arbitrary strings that, when changed, will force the `docker_registry_image` resource to be replaced. This can be used to rebuild an image when contents of source code folders change or to repush a local image",
Type: schema.TypeMap,
Optional: true,
ForceNew: true,
},

"sha256_digest": {
Type: schema.TypeString,
Description: "The sha256 digest of the image.",
Expand Down