-
Notifications
You must be signed in to change notification settings - Fork 154
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
policy_set data and resource change to include attributes from PPRV #1234
Conversation
d61df3a
to
fa7c69c
Compare
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.
Great work! Some preliminary feedback below ⬇️
org, orgCleanup := createBusinessOrganization(t, tfeClient) | ||
t.Cleanup(orgCleanup) |
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.
If this is available in TFE, we should add a check here to only upgrade the subscription if it is not enterpriseEnabled()
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.
isn't that check already included inside the createBusinessOrg function here? https://github.com/hashicorp/terraform-provider-tfe/blob/main/internal/provider/testing.go#L76
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.
createBusinessOrg
skips the test for TFE since there are no feature sets in TFE. So it should look something along these lines:
var org *tfe.Organization
var cleanup func()
if enterpriseEnabled(t) {
org, cleanup = createOrganization()
} else {
// we are in TFC so we have a subscription to upgrade, otherwise nothing to upgrade
org, cleanup = createBusinessOrganization()
}
036a896
to
58fb5a0
Compare
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.
LGTM 👍
Description
Now that pinned policy runtime version is in GA, we have two new attributes in the policy set :
agent_enabled
andpolicy_tool_version
. This PR updates the policy_set resource and data to reflect the same.Note: This is tested against an unreleased commit of the go-tfe library: hashicorp/go-tfe#752
Once go-tfe version is released, this PR needs to updated with the latest version
Remember to:
Output from acceptance tests
Needs the following env vars:
TFE_HOSTNAME=tfcdev-1dfef877.au.ngrok.io;
TFE_TOKEN=
ENABLE_BETA=1
TF_ACC=1;
Data source tests:
Resource Tests:
Documentation Screenshots: