You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the stages attribute for the Workspace Run Task resource (#1459)
* Add a client capabilites resolver
This commit adds a resolver interface which will be used within the codebase
to determine what the capabilities of the remote service are (e.g. Is is Enterprise,
if so what version). Note this is an interface, not a struct to make testing
easier.
Later commits will use this resolver.
* Use the new stages attribute for run tasks
Previously the schema for workspace run tasks was updated for the new stages
property however it wasn't actually used. This commit updates the Workspace
Run Task resource to aware of the stages attributes. In particular;
* Attempts to detect if the remote service supports the stages property. Stages
is available in HCP Terraform and TFE v202404-1 onwards.
* Munges the Stages and Stage attribtue depending on the remote capability.
* Emits a warning about the remove server capability.
* Adds some automated tests. Unfortunately we can't test older TFE versions,
to ensure the munging is correct, however manual testing was performed in
a local development enivronment to confirm the behaviour.
* Removes the default value for the Stage property in the Schema. This will
not cause issues with existing state and allows the provider to determine
if the attribute was passed in via configuration as opposed to defaulting.
* Update changelog
* Memoize the result for supportsStagesProperty
* Remove pointer for slice
Removing the pointer reference as it's not required.
* Do not reuse test subject for workspace run task
Previously the test subject for the stagesSupport unit tests would reuse the
subject and resolver however this led to timing issues when parallel tests
were run. This commit changes the test to create new objects per test.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,9 @@
4
4
5
5
*`r/tfe_team`: Default "secret" visibility has been removed from tfe_team because it now requires explicit or owner access. The default, "organization", is now computed by the platform. by @brandonc[#1439](https://github.com/hashicorp/terraform-provider-tfe/pull/1439)
6
6
7
+
BUG FIXES:
8
+
*`r/tfe_workspace_run_task`: The Workspace Run Task resource will use the stages attribute by @glennsarti[#1459](https://github.com/hashicorp/terraform-provider-tfe/pull/1459)
detail:=fmt.Sprintf("The version of Terraform Enterprise does not support the stages attribute on Workspace Run Tasks. Got %s but requires v202404-1+", r.config.Client.RemoteTFEVersion())
0 commit comments