diff --git a/CHANGELOG.md b/CHANGELOG.md index aee681505..cdcae174c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Unreleased +## Bug Fixes + +* Fixes `IngressAttributes` field decoding in `PolicySetVersion` by @rageshganeshkumar [#1164](https://github.com/hashicorp/go-tfe/pull/1164) + ## Enhancements * Add support for querying and filtering private registry modules based on a search query, `provider`, `registry_name` and `organization_name`, by @gautambaghel [#1179](https://github.com/hashicorp/go-tfe/pull/1179) * Adds support for `RegistryModule` VCS source_directory and tag_prefix options, by @jillrami [#1154] (https://github.com/hashicorp/go-tfe/pull/1154) diff --git a/policy_set_version.go b/policy_set_version.go index 842245294..fb5553fd4 100644 --- a/policy_set_version.go +++ b/policy_set_version.go @@ -67,6 +67,12 @@ type PolicySetVersionStatusTimestamps struct { ErroredAt time.Time `jsonapi:"attr,errored-at,rfc3339"` } +type PolicySetIngressAttributes struct { + CommitSHA string `jsonapi:"attr,commit-sha"` + CommitURL string `jsonapi:"attr,commit-url"` + Identifier string `jsonapi:"attr,identifier"` +} + // PolicySetVersion represents a Terraform Enterprise Policy Set Version type PolicySetVersion struct { ID string `jsonapi:"primary,policy-set-versions"` @@ -77,7 +83,7 @@ type PolicySetVersion struct { ErrorMessage string `jsonapi:"attr,error-message"` CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"` UpdatedAt time.Time `jsonapi:"attr,updated-at,iso8601"` - IngressAttributes *IngressAttributes `jsonapi:"attr,ingress-attributes"` + IngressAttributes *PolicySetIngressAttributes `jsonapi:"attr,ingress-attributes"` // Relations PolicySet *PolicySet `jsonapi:"relation,policy-set"`