Skip to content

Commit

Permalink
feat: Add triggers attribute to docker_registry_image
Browse files Browse the repository at this point in the history
  • Loading branch information
WassimKallel authored and lenox-joseph committed Dec 22, 2022
1 parent 380cebf commit 8f6deba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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

0 comments on commit 8f6deba

Please sign in to comment.