-
Notifications
You must be signed in to change notification settings - Fork 103
Add IngressAttributes to PolicySetVersion #1092
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
Add IngressAttributes to PolicySetVersion #1092
Conversation
sebasslash
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Thank you for making this change!
In order to test your branch against CI, we'll need to rebase your changes onto a local branch. There are a few things we'll need to address before doing so ⬇️
|
@sebasslash Thank you, I have applied the changes based from feedback. |
CHANGELOG.md
Outdated
| ======= | ||
| * Adds `AgentPool` field to the OAuthClientUpdateOptions struct, which is used to associate a VCS Provider with an AgentPool for PrivateVCS support by @jpogran [#1075](https://github.com/hashicorp/go-tfe/pull/1075) | ||
| * Adds `IngressAttributes` field to `PolicySetVersion` by @jpadrianoGo [#1092](https://github.com/hashicorp/go-tfe/pull/1092) | ||
| >>>>>>> Updated changelog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there are some leftover artifacts from rebasing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, updated Changelog
|
See #1108 |
|
Thank you @sebasslash |
|
#1108 has been merged, thanks for contributing JP! |
Description
This PR adds an new PolicySetVersion field,
IngressAttributesstruct withcommit-sha,commit-url, andidentifierfields. PolicySetVersion now includesIngressAttributes.The change aims to be part of automating policy-set creation and testing. This aligns PolicySetVersions.Read return with curl's return.
curl
--header "Authorization: Bearer $TOKEN"
--request GET
https://app.terraform.io/api/v2/policy-set-versions/polsetver-cXciu9nQwmk9Cfrn
PolicySetVersions.Read(ctx context.Context, policySetVersionID string) (*PolicySetVersion, error)
{ "data": { "id": "polsetver-", "type": "policy-set-versions", "attributes": { "source": "github", "status": "ready", "status-timestamps": { "ready-at": "2024-11-10T00:14:59+00:00", "ingressing-at": "2024-11-10T00:14:54+00:00" }, "error": null, "error-message": null, "ingress-attributes": { "commit-sha": "", "commit-url": "", "identifier": "" }, "created-at": "2024-11-10T00:14:54.604Z", "updated-at": "2024-11-10T00:14:59.500Z" }, "relationships": { "policy-set": { "data": { "id": "polset-", "type": "policy-sets" } } }, "links": { "self": "/api/v2/policy-set-versions/polsetver-" } } }
Testing plan
TFE_ADDRESSandTFE_TOKENTFE_ADDRESS="https://example" TFE_TOKEN="example" GITHUB_POLICY_SET_IDENTIFIER="username/repository" OAUTH_CLIENT_GITHUB_TOKEN="githubtoken" go test ./... -v -run TestPolicySetVersionsIngressAttributes. The new tests should pass.IngressAttributesis read for PolicySetVersion.External links
Output from tests
Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.