Add space delimited CRUD operations to Workers using the new client #269
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
The current
worker_service
is still using the 'old' client which does not utilise theSpaceID
on the Worker resource. This means that the worker_service cannot be used in situations where the spaceId is not already set on the base client itself. An example of such a situation is when you want to create the space and worker resource in the same invocation ofterraform apply
. The spaceId cannot be known ahead of time, and hence cannot be set on the Terraform provider config in advance. The current code then creates a bug as the optional SpaceID field on the Worker suggests that the service supports space delimited operations, whereas in reality the operations fallback to the default space.Needed for OctopusDeployLabs/terraform-provider-octopusdeploy#655
Results
Copies the same pattern of deprecating old CRUD functions in favour of new ones using the
newClient
.