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
Upgrade Terraspace: Are you using the latest version of Terraspace? This allows Terraspace to fix issues fast. There's an Upgrading Guide: https://terraspace.cloud/docs/misc/upgrading/
Reproducibility: Are you reporting a bug others will be able to reproduce and not asking a question. If you're unsure or want to ask a question, do so on https://community.boltops.com
Code sample: Have you put together a code sample to reproduce the issue and make it available? Code samples help speed up fixes dramatically. If it's an easily reproducible issue, then code samples are not needed. If you're unsure, please include a code sample.
My Environment
Software
Version
Operating System
MacOS
Terraform
v1.5.1
Terraspace
2.2.7
Ruby
3.2.1
Expected Behaviour
When calling terraspace import <STACK> 'module.some["parameter"].resource.name' 'arn:abc' through a shell it should preserve the double-quotes inside the single-quoted parameter.
Current Behavior
It is calling correct the terraform command, example:
The problem is that it's calling through a shell, then the double-quotes are being caught by the shell and the Terraform get the parameter without double-quotes, causing the error:
│ Error: Index value required
│
│ on <import-address> line 1:
│ 1: module.some[parameter].resource.name
│
│ Index brackets must contain either a literal number or a literal string.
Step-by-step reproduction instructions
Try to import any existent resource that uses a for_each statement, using a map(any) instead of a list.
Code Sample
Solution Suggestion
What I'm doing to by-pass this problem is to escape the double-quotes, like:
I suggest replace any double-quotes with the escape character. this approach as a simple one to by-pass this hassle. The other solution is do not run it through a shell, but it may impact other subcommands, so it's more risky to introduce new bugs.
The text was updated successfully, but these errors were encountered:
Checklist
My Environment
Expected Behaviour
When calling
terraspace import <STACK> 'module.some["parameter"].resource.name' 'arn:abc'
through a shell it should preserve the double-quotes inside the single-quoted parameter.Current Behavior
It is calling correct the terraform command, example:
The problem is that it's calling through a shell, then the double-quotes are being caught by the shell and the Terraform get the parameter without double-quotes, causing the error:
Step-by-step reproduction instructions
Try to import any existent resource that uses a
for_each
statement, using amap(any)
instead of a list.Code Sample
Solution Suggestion
What I'm doing to by-pass this problem is to escape the double-quotes, like:
I suggest replace any double-quotes with the escape character. this approach as a simple one to by-pass this hassle. The other solution is do not run it through a shell, but it may impact other subcommands, so it's more risky to introduce new bugs.
The text was updated successfully, but these errors were encountered: