Skip to content

Commit

Permalink
Merge branch 'master' into add-federated-huggingfaceml-repo
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhung authored Jan 7, 2025
2 parents 10701a9 + 3669053 commit 47379b2
Show file tree
Hide file tree
Showing 24 changed files with 153 additions and 43 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
## 12.8.0 (January 3, 2025). Tested on Artifactory 7.98.12 with Terraform 1.10.3 and OpenTofu 1.8.8
## 12.8.0 (January 7, 2025). Tested on Artifactory 7.98.13 with Terraform 1.10.3 and OpenTofu 1.8.8

FEATURES:

**New Resource:** `artifactory_federated_huggingfaceml_repository` to support federated HuggingFace ML repository. PR: [#1161](https://github.com/jfrog/terraform-provider-artifactory/pull/1161)

IMPROVEMENTS:

* resource/artifactory_\*\_custom_webhook: Add attribute `method` to support setting HTTP method. PR: [#1160](https://github.com/jfrog/terraform-provider-artifactory/pull/1160) and [#1163](https://github.com/jfrog/terraform-provider-artifactory/pull/1163)

BUG FIXES:

* resource/artifactory_artifact: Fix artifact upload incorrectly (using multipart form vs raw binary data). Issue: [#1083](https://github.com/jfrog/terraform-provider-artifactory/issues/1083) PR: [#1164](https://github.com/jfrog/terraform-provider-artifactory/pull/1164)

## 12.7.1 (December 18, 2024). Tested on Artifactory 7.98.11 with Terraform 1.10.2 and OpenTofu 1.8.7

BUG FIXES:
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/artifact_custom_webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ resource "artifactory_artifact_custom_webhook" "artifact-custom-webhook" {
handler {
url = "https://tempurl.org"
method = "POST"
secrets = {
secretName1 = "value1"
secretName2 = "value2"
Expand Down Expand Up @@ -58,6 +59,7 @@ The following arguments are supported:
* `exclude_patterns` - (Optional) Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, *\*, ?). For example: `org/apache/**`.
* `handler` - (Required) At least one is required.
* `url` - (Required) Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
* `method` - (Optional) Specifies the HTTP method for the URL that the Webhook invokes. Allowed values are: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`.
* `secrets` - (Optional) Defines a set of sensitive values (such as, tokens and passwords) that can be injected in the headers and/or payload.Secrets’ values are encrypted. In the header/payload, the value can be invoked using the `{{.secrets.token}}` format, where token is the name provided for the secret value. Comprise key/value pair. **Note:** if multiple handlers are used, same secret name and different secret value for the same url won't work. Example:

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/artifact_lifecycle_custom_webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ resource "artifactory_artifact_lifecycle_custom_webhook" "artifact-lifecycle-cus
handler {
url = "https://tempurl.org"
method = "POST"
secrets = {
secretName1 = "value1"
secretName2 = "value2"
Expand All @@ -39,6 +40,7 @@ The following arguments are supported:
* `event_types` - (Required) List of event triggers for the Webhook. Allow values: `archive`, `restore`
* `handler` - (Required) At least one is required.
* `url` - (Required) Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
* `method` - (Optional) Specifies the HTTP method for the URL that the Webhook invokes. Allowed values are: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`.
* `secrets` - (Optional) Defines a set of sensitive values (such as, tokens and passwords) that can be injected in the headers and/or payload.Secrets’ values are encrypted. In the header/payload, the value can be invoked using the `{{.secrets.token}}` format, where token is the name provided for the secret value. Comprise key/value pair. **Note:** if multiple handlers are used, same secret name and different secret value for the same url won't work. Example:

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/artifact_property_custom_webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ resource "artifactory_artifact_property_custom_webhook" "artifact-custom-webhook
handler {
url = "https://tempurl.org"
method = "POST"
secrets = {
secretName1 = "value1"
secretName2 = "value2"
Expand Down Expand Up @@ -58,6 +59,7 @@ The following arguments are supported:
* `exclude_patterns` - (Optional) Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, *\*, ?). For example: `org/apache/**`.
* `handler` - (Required) At least one is required.
* `url` - (Required) Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
* `method` - (Optional) Specifies the HTTP method for the URL that the Webhook invokes. Allowed values are: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`.
* `secrets` - (Optional) Defines a set of sensitive values (such as, tokens and passwords) that can be injected in the headers and/or payload.Secrets’ values are encrypted. In the header/payload, the value can be invoked using the `{{.secrets.token}}` format, where token is the name provided for the secret value. Comprise key/value pair. **Note:** if multiple handlers are used, same secret name and different secret value for the same url won't work. Example:

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/artifactory_release_bundle_custom_webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ resource "artifactory_artifactory_release_bundle_custom_webhook" "artifactory-re
handler {
url = "https://tempurl.org"
method = "POST"
secrets = {
secretName1 = "value1"
secretName2 = "value2"
Expand Down Expand Up @@ -52,6 +53,7 @@ The following arguments are supported:
* `exclude_patterns` - (Optional) Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, *\*, ?). For example: `org/apache/**`
* `handler` - (Required) At least one is required.
* `url` - (Required) Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
* `method` - (Optional) Specifies the HTTP method for the URL that the Webhook invokes. Allowed values are: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`.
* `secrets` - (Optional) Defines a set of sensitive values (such as, tokens and passwords) that can be injected in the headers and/or payload.Secrets’ values are encrypted. In the header/payload, the value can be invoked using the `{{.secrets.token}}` format, where token is the name provided for the secret value. Comprise key/value pair. **Note:** if multiple handlers are used, same secret name and different secret value for the same url won't work. Example:

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/build_custom_webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ resource "artifactory_build_custom_webhook" "build-custom-webhook" {
handler {
url = "https://tempurl.org"
method = "POST"
secrets = {
secretName1 = "value1"
secretName2 = "value2"
Expand Down Expand Up @@ -50,6 +51,7 @@ The following arguments are supported:
* `exclude_patterns` - (Optional) Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, *\*, ?). For example: `org/apache/**`.
* `handler` - (Required) At least one is required.
* `url` - (Required) Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
* `method` - (Optional) Specifies the HTTP method for the URL that the Webhook invokes. Allowed values are: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`.
* `secrets` - (Optional) Defines a set of sensitive values (such as, tokens and passwords) that can be injected in the headers and/or payload.Secrets’ values are encrypted. In the header/payload, the value can be invoked using the `{{.secrets.token}}` format, where token is the name provided for the secret value. Comprise key/value pair. **Note:** if multiple handlers are used, same secret name and different secret value for the same url won't work. Example:

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/destination_custom_webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ resource "artifactory_destination_custom_webhook" "destination-custom-webhook" {
handler {
url = "https://tempurl.org"
method = "POST"
secrets = {
secretName1 = "value1"
secretName2 = "value2"
Expand Down Expand Up @@ -50,6 +51,7 @@ The following arguments are supported:
* `exclude_patterns` - (Optional) Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, *\*, ?). For example: `org/apache/**`
* `handler` - (Required) At least one is required.
* `url` - (Required) Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
* `method` - (Optional) Specifies the HTTP method for the URL that the Webhook invokes. Allowed values are: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`.
* `secrets` - (Optional) Defines a set of sensitive values (such as, tokens and passwords) that can be injected in the headers and/or payload.Secrets’ values are encrypted. In the header/payload, the value can be invoked using the `{{.secrets.token}}` format, where token is the name provided for the secret value. Comprise key/value pair. **Note:** if multiple handlers are used, same secret name and different secret value for the same url won't work. Example:

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/distribution_custom_webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ resource "artifactory_distribution_custom_webhook" "distribution-custom-webhook"
handler {
url = "https://tempurl.org"
method = "POST"
secrets = {
secretName1 = "value1"
secretName2 = "value2"
Expand Down Expand Up @@ -50,6 +51,7 @@ The following arguments are supported:
* `exclude_patterns` - (Optional) Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, *\*, ?). For example: `org/apache/**`.
* `handler` - (Required) At least one is required.
* `url` - (Required) Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
* `method` - (Optional) Specifies the HTTP method for the URL that the Webhook invokes. Allowed values are: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`.
* `secrets` - (Optional) Defines a set of sensitive values (such as, tokens and passwords) that can be injected in the headers and/or payload.Secrets’ values are encrypted. In the header/payload, the value can be invoked using the `{{.secrets.token}}` format, where token is the name provided for the secret value. Comprise key/value pair. **Note:** if multiple handlers are used, same secret name and different secret value for the same url won't work. Example:

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/docker_custom_webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ resource "artifactory_docker_custom_webhook" "docker-custom-webhook" {
handler {
url = "https://tempurl.org"
method = "POST"
secrets = {
secretName1 = "value1"
secretName2 = "value2"
Expand Down Expand Up @@ -58,6 +59,7 @@ The following arguments are supported:
* `exclude_patterns` - (Optional) Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, *\*, ?). For example: `org/apache/**`.
* `handler` - (Required) At least one is required.
* `url` - (Required) Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
* `method` - (Optional) Specifies the HTTP method for the URL that the Webhook invokes. Allowed values are: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`.
* `secrets` - (Optional) Defines a set of sensitive values (such as, tokens and passwords) that can be injected in the headers and/or payload.Secrets’ values are encrypted. In the header/payload, the value can be invoked using the `{{.secrets.token}}` format, where token is the name provided for the secret value. Comprise key/value pair. **Note:** if multiple handlers are used, same secret name and different secret value for the same url won't work. Example:

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/release_bundle_custom_webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ resource "artifactory_release_bundle_custom_webhook" "release-bundle-custom-webh
handler {
url = "https://tempurl.org"
method = "POST"
secrets = {
secretName1 = "value1"
secretName2 = "value2"
Expand Down Expand Up @@ -52,6 +53,7 @@ The following arguments are supported:
* `exclude_patterns` - (Optional) Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, *\*, ?). For example: "org/apache/**".
* `handler` - (Required) At least one is required.
* `url` - (Required) Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
* `method` - (Optional) Specifies the HTTP method for the URL that the Webhook invokes. Allowed values are: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`.
* `secrets` - (Optional) Defines a set of sensitive values (such as, tokens and passwords) that can be injected in the headers and/or payload.Secrets’ values are encrypted. In the header/payload, the value can be invoked using the `{{.secrets.token}}` format, where token is the name provided for the secret value. Comprise key/value pair. **Note:** if multiple handlers are used, same secret name and different secret value for the same url won't work. Example:

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/release_bundle_v2_custom_webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ resource "artifactory_release_bundle_v2_custom_webhook" "release-bundle-v2-custo
handler {
url = "https://tempurl.org"
method = "POST"
secrets = {
secretName1 = "value1"
secretName2 = "value2"
Expand Down Expand Up @@ -50,6 +51,7 @@ The following arguments are supported:
* `exclude_patterns` - (Optional) Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, *\*, ?). For example: "org/apache/**".
* `handler` - (Required) At least one is required.
* `url` - (Required) Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
* `method` - (Optional) Specifies the HTTP method for the URL that the Webhook invokes. Allowed values are: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`.
* `secrets` - (Optional) Defines a set of sensitive values (such as, tokens and passwords) that can be injected in the headers and/or payload.Secrets’ values are encrypted. In the header/payload, the value can be invoked using the `{{.secrets.token}}` format, where token is the name provided for the secret value. Comprise key/value pair. **Note:** if multiple handlers are used, same secret name and different secret value for the same url won't work. Example:

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/release_bundle_v2_promotion_custom_webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ resource "artifactory_release_bundle_v2_promotion_custom_webhook" "release-bundl
handler {
url = "https://tempurl.org"
method = "POST"
secrets = {
secretName1 = "value1"
secretName2 = "value2"
Expand Down Expand Up @@ -49,6 +50,7 @@ The following arguments are supported:
* `selected_environments` - (Required) Trigger on this list of environment names.
* `handler` - (Required) At least one is required.
* `url` - (Required) Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
* `method` - (Optional) Specifies the HTTP method for the URL that the Webhook invokes. Allowed values are: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`.
* `secrets` - (Optional) Defines a set of sensitive values (such as, tokens and passwords) that can be injected in the headers and/or payload.Secrets’ values are encrypted. In the header/payload, the value can be invoked using the `{{.secrets.token}}` format, where token is the name provided for the secret value. Comprise key/value pair. **Note:** if multiple handlers are used, same secret name and different secret value for the same url won't work. Example:

```hcl
Expand Down
6 changes: 5 additions & 1 deletion docs/resources/user_custom_webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ resource "artifactory_user_custom_webhook" "user-custom-webhook" {
handler {
url = "https://tempurl.org"
method = "POST"
secrets = {
secretName1 = "value1"
secretName2 = "value2"
Expand All @@ -38,12 +39,14 @@ The following arguments are supported:
* `enabled` - (Optional) Status of webhook. Default to `true`
* `event_types` - (Required) List of event triggers for the Webhook. Allow values: `locked`
* `handler` - (Required) At least one is required.
* `url` - (Required) Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
* `url` - (Required) Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send a request to.
* `method` - (Optional) Specifies the HTTP method for the URL that the Webhook invokes. Allowed values are: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`.
* `secrets` - (Optional) Defines a set of sensitive values (such as, tokens and passwords) that can be injected in the headers and/or payload.Secrets’ values are encrypted. In the header/payload, the value can be invoked using the `{{.secrets.token}}` format, where token is the name provided for the secret value. Comprise key/value pair. **Note:** if multiple handlers are used, same secret name and different secret value for the same url won't work. Example:

```hcl
handler {
url = "https://tempurl.org" # same url in both handlers
method = "POST"
secrets = {
secretName1 = "value1"
secretName2 = "value2"
Expand All @@ -56,6 +59,7 @@ handler {
}
handler {
url = "https://tempurl.org" # same url in both handlers
method = "POST"
secrets = {
secretName1 = "newValue1" # same secret name, but different value
secretName2 = "newValue2" # same secret name, but different value
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/sethvargo/go-password v0.3.1
github.com/stretchr/testify v1.10.0
golang.org/x/exp v0.0.0-20231127185646-65229373498e
golang.org/x/net v0.33.0
golang.org/x/net v0.34.0
gopkg.in/ldap.v2 v2.5.1
gopkg.in/yaml.v3 v3.0.1
)
Expand Down Expand Up @@ -92,9 +92,9 @@ require (
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/zclconf/go-cty v1.15.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/crypto v0.32.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/text v0.21.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
Expand Down
Loading

0 comments on commit 47379b2

Please sign in to comment.