-
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
Updated the resourceTFEPolicySetUpdate function #185
Updated the resourceTFEPolicySetUpdate function #185
Conversation
…hanges to vcs_repo
tfe/provider_test.go
Outdated
@@ -103,6 +103,7 @@ var GITHUB_WORKSPACE_IDENTIFIER = os.Getenv("GITHUB_WORKSPACE_IDENTIFIER") | |||
var GITHUB_WORKSPACE_BRANCH = os.Getenv("GITHUB_WORKSPACE_BRANCH") | |||
var GITHUB_POLICY_SET_IDENTIFIER = os.Getenv("GITHUB_POLICY_SET_IDENTIFIER") | |||
var GITHUB_POLICY_SET_BRANCH = os.Getenv("GITHUB_POLICY_SET_BRANCH") | |||
var GITHUB_POLICY_SET_ALT_BRANCH = os.Getenv("GITHUB_POLICY_SET_ALT_BRANCH") |
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.
would it be possible to avoid introducing another env var here? there are getting unwieldy. i'd love to find an alternative, if there is one, but it is pretty low priority.
the tfe_workspace tests also have a vcs repo and test going from master to GITHUB_WORKSPACE_BRANCH. is that something that would be possible to do here as well, to avoid the need for another env var?
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.
@lafentres I've made a few changes to the vcs related tests so as to move away from our reliance on env vars. Take a look and let me know what you think.
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.
This looks good to me! I tested migrating from the old version to this new version, updating various VCS repo fields, and removing the VCS repo. Everything worked as expected.
Description
This PR contains a change to the resourceTFEPolicySetUpdate function within the tfe_policy_set resource that detects changes to the vcs_repo attributes. The issue is covered in more detail in the following:
Policy vcs_repo can't be updated #140
Testing plan
Output from acceptance tests