Repository navigation
Releases: CiscoDevNet/terraform-provider-secureworkload
Release list
v1.8.2
Two fixes for issues reported against 1.8.1. No state migration is needed for this release.
Fixed
-
secureworkload_portcan now create an ANY service, meaning all protocols and all ports. Leavestart_port,end_portandprotoout of the resource:resource "secureworkload_port" "any" { policy_id = secureworkload_policies.policy1.id }
Ports cannot be used with a wildcard protocol, so if you set
start_portandend_portyou must also setproto, and if you set one port you must set both. Both cases are now reported before the request is sent instead of coming back as an error from the cluster. (#53) -
secureworkload_enforcecan now manage a workspace that is already enforcing. Before this the apply failed withversion pN is already enforced, and there was no way to import the existing enforcement, so the only option was to disable enforcement first and leave the workspace unenforced until the next apply. (#54)
Import
Enforcement that is already running on a workspace can now be brought into Terraform. The ID is the workspace ID:
terraform import secureworkload_enforce.enforced <workspace-id>Importing only reads the workspace, so the enforcement stays as it is.
Full Changelog: v1.8.1...v1.8.2
v1.8.1
Bug fix release covering the four open issues, plus some problems found while testing them.
Upgrading
Back up your state file before you upgrade.
secureworkload_port used to store the ID of the parent policy instead of the ID of the service port, and secureworkload_enforce used to store the enforcement epoch instead of the workspace ID. Both are corrected here, and existing state is migrated for you the first time you run a plan or an apply.
The migration only goes one way. After you apply with 1.8.1, version 1.8.0 will not read the state of those two resources any more and reports Resource instance managed by newer provider version. Restoring a state backup is the only way back.
Run terraform plan first. A plan does not write state, so you can check the result before committing to it. For ports and enforcement you should see no changes.
Fixed
secureworkload_portcould not be deleted. The delete request was built but never sent, so removing or changing a port left the old one in place on the policy. Ports also all shared the ID of their parent policy, so Terraform could not tell two ports apart. (#41)- Enforcement never moved to newer policy versions. There is a new
track_latest_versionoption that enforces the latest version of the workspace on each apply, so you no longer have to look the version up and put it in your config. Changingversionnow re-enforces in place instead of disabling and re-enabling. (#35) - Resources were destroyed and recreated on every run. The main cause was the policy resource reading
policy_actionfrom the API response, which the API returns asaction, so the value came back empty and Terraform planned a replacement every time. Replacing the policy then took its ports with it. (#36) - Requests that fail with HTTP 429 or a 5xx error are retried with a backoff, and
Retry-Afteris honoured when the API sends it. Number of attempts can be set withmax_retries. (#40) - API calls now have a timeout, set with
http_timeoutand defaulting to 120 seconds. Before this the provider used a client with no timeout at all, so a request could hang forever if the cluster stopped responding.
Also fixed
secureworkload_rolecan changenameanddescriptionwithout being recreated. Before, changing either failed withdoesnt support updateand the plan could not be applied at all.secureworkload_workspacecan changename,descriptionandprimarywithout being recreated.secureworkload_scopeno longer shows a change topolicy_priorityon every plan. The API does not support changing it on an existing scope, so it now forces a new scope instead of reporting success and doing nothing.secureworkload_scopereadssub_typeback from the API, so a change made outside Terraform is detected.secureworkload_clusterandsecureworkload_filterread their query back fromshort_queryrather than the expanded query, which never matched what you wrote and caused the resource to be replaced on every plan.- Reads no longer fail when a resource has been deleted outside Terraform. The resource is removed from state instead.
secureworkload_userno longer sends empty entries inrole_ids.
Known limitations
- Nested
cluster,filterand policy blocks insidesecureworkload_workspacestill force the workspace to be recreated. The API only acceptsname,primaryanddescriptionon an update, so there is no way to change them in place. Use the separatesecureworkload_cluster,secureworkload_filterandsecureworkload_policiesresources instead. See #52. - A
secureworkload_workspacewith a nestedclusterblock cannot be created. This also affects 1.8.0. See #51. - The 429 handling has not been confirmed against a cluster that is actually rate limiting. See #40.
Full Changelog: v1.8.0...v1.8.1