[IPL-7725] Updating Calls to the Remote HCP Terraform API to Retrieve All Workspace Variables#37241
Conversation
|
@hashicorp/terraform-aws @hashicorp/tf-eco-hybrid-cloud @hashicorp/terraform-azure Can you all check whether these dependency updates look safe to you and/or test as needed? |
radeksimko
left a comment
There was a problem hiding this comment.
This looks ok from my POV but I would defer to the Core Cloud team on the actual logic being changed here.
|
@iBrandyJackson and @katbyte : Can you folks, please help as well. |
alexsomesan
left a comment
There was a problem hiding this comment.
Looks good from the Kubernetes perspective.
BBBmau
left a comment
There was a problem hiding this comment.
LGTM, the dependencies changes on the gcs backend are very minor
jackofallops
left a comment
There was a problem hiding this comment.
Looks fine from Azureland 👍
d9fc245
Maed223
left a comment
There was a problem hiding this comment.
Looks good from the Core Cloud perspective 👍
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Description
Original Problem
While doing a
terraform import, it was observed that variables inherited from variable sets in HCP Terraform were notgetting resolved, which caused the No value for required variable error. Usually, in such cases, terraform would make
an API call to HCP Terraform (via go-tfe client) to retrieve the list of variables accessible to the workspace. However,
the HCP Terraform API failed to include inherited variables that were not overwritten by workspace variables, which led
to the error.
Proposed Solution
We updated the HCP Terraform API to include the following variables for a workspace:
The updated API was included in the latest version (v1.83.0) of the go-tfe client, and this PR updates the go-tfe client
version and updates the API calls in the
terraform importcommand to use the new API.Note - the terraform
importblock does not face this issue since it is executed during a plan / apply run, andimporting variables from variable sets works as expected.
Testing
terraform importon a workspace with inherited variables from variablesets. Evidence attached below.
Documentation and External References
Target Release
1.14.x
Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
NO
CHANGELOG entry
Testing Evidence