Skip to content
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

Add support for Terraform 1.5 import {} actions #31

Merged
merged 18 commits into from
Jul 26, 2023

Conversation

ahinh43
Copy link
Collaborator

@ahinh43 ahinh43 commented Jul 21, 2023

This PR adds in support for the import block which was introduced in Terraform 1.5.

Imported resources are shown in a new N to import field similar to the CLI and TF cloud output.

image

Additionally, some extra changes are made to make this change possible:

Dependency Updates

  • go-tfe was updated to 1.30.0 to support the new API actions for imported resources
  • terraform-json was updated to 0.17.1 to add support for imported resources
  • Any dependencies needed by the new versions were updated
  • It will be implied that when testing these changes, you will need to use Terraform 1.5.0 or greater to support the import blocks. Older versions may fail when parsing the import {} blocks.

Localdev changes

Localdev changes needed to test the new import fields

  • Added 2 new resources that utilize Terraform's import function
  • The wait-for-ngrok-url job was relaxed to grep only ngrok instead of ngrok.io due to the free app using a different DNS suffix (ngrok-free.app) vs (ngrok.io)

@ahinh43 ahinh43 marked this pull request as ready for review July 21, 2023 18:58
@ahinh43 ahinh43 changed the title Add support for import {} actions Add support for Terraform 1.5 import {} actions Jul 21, 2023
Signed-off-by: Alec Hinh <[email protected]>
Signed-off-by: Alec Hinh <[email protected]>
Signed-off-by: Alec Hinh <[email protected]>
@sl1pm4t
Copy link
Contributor

sl1pm4t commented Jul 26, 2023

I rebased your change on main and resolved a conflict, but otherwise LGTM.

@sl1pm4t sl1pm4t merged commit 65b18e0 into zapier:main Jul 26, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants