Open alexpilon666 opened 1 year ago
As far as I know terraspace doesn't pass such arguments to terraform unless there's a wrapper already.
For example you can do terraspace output
for the whole stack. But can't get value of individual output. Also -target
is also not implemented.
Checklist
My Environment
Expected Behaviour
The underlying
terraform
command should receive the passed-throughterraspace all
arguments, such asterraspace all plan <stackName> -destroy
-->terraform plan -destroy
.Current Behavior
The underlying
terraform
command does not receiveterraspace all
arguments, and uses the defaultterraform <cmd> -input=false
command every time. This seems to only be true when usingterraform
-specific arguments, like-destroy
,-refresh=false
. When using--out <planName>
it works properly.Step-by-step reproduction instructions
To reproduce:
terraspace plan Β <stackName> -refresh=false
works:ββpilona@ ~/GIT_PROJECTS/terraspace
β°ββ€ TS_ENV=dev TS_EXTRA='edu' TS_BUFFER_TIMEOUT=10800 terraspace plan -refresh=false
Building .terraspace-cache/canadacentral/dev/stacks/.edu
config/terraform/tfvars/base.tfvars
config/terraform/tfvars/dev.tfvars
config/terraform/tfvars/edu.tfvars
config/terraform/tfvars/dev-edu.tfvars
config/terraform/tfvars/canadacentral.tfvars
config/terraform/tfvars/canadacentral/base.tfvars
config/terraform/tfvars/canadacentral/dev.tfvars
config/terraform/tfvars/canadacentral/edu.tfvars
config/terraform/tfvars/canadacentral/dev-edu.tfvars
app/stacks//tfvars/base.tfvars (found)
app/stacks//tfvars/dev.tfvars
app/stacks//tfvars/edu.tfvars
app/stacks//tfvars/dev-edu.tfvars
app/stacks//tfvars/canadacentral.tfvars
app/stacks//tfvars/canadacentral/base.tfvars
app/stacks//tfvars/canadacentral/dev.tfvars
app/stacks//tfvars/canadacentral/edu.tfvars
app/stacks//tfvars/canadacentral/dev-edu.tfvars (found)
Current directory: .terraspace-cache/canadacentral/dev/stacks/.edu
=> terraform plan -refresh=false -input=false
data.azurerm_client_config.this: Reading...
data.azurerm_client_config.this: Read complete after 0s [id=Y2xpZW50Q29uZmlncy9jbGllbnRJZD02ODI1NTdmYS0zYjFmLTQzODItYmQyOS01ZjZhOTk4NjVjNWM7b2JqZWN0SWQ9YmY3MTIxZmQtOTY5Yy00OGVkLWIxODctOTdhYzQwYmQ4NzA2O3N1YnNjcmlwdGlvbklkPWFiY2RkMGE3LTg0ZmYtNGM5Yy1iMDY2LTY3OGY5MTQyOWQwNTt0ZW5hbnRJZD01NTFlYmU3Yy00NzdkLTQ2MDctYjlhNi0xMDFlZTM2NWU3NzU=]
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.
terraspace all plan <stackName> -refresh=false
does not work:ββpilona@MTLWINMN156 ~/GIT_PROJECTS/terraspace β°ββ€ TS_ENV=dev TS_EXTRA='edu' TS_BUFFER_TIMEOUT=10800 terraspace all plan -refresh=false; terraspace logs plan -a
Running: terraspace plan # batch 1
Batch Run 1:
Running: terraspace plan Logs: log/plan/.log
terraspace plan : Plan: 0 to add, 2 to change, 0 to destroy.
Time took: 18s
Showing: log/plan/.log
[2023-03-01T12:54:13 #1963584 terraspace plan ]: Current directory: .terraspace-cache/canadacentral/dev/stacks/.edu
[2023-03-01T12:54:15 #1963584 terraspace plan ]: => terraform plan -input=false
[2023-03-01T12:54:26 #1963584 terraspace plan ]: data.azurerm_client_config.this: Reading...
[2023-03-01T12:54:26 #1963584 terraspace plan ]: module.resource_group.azurerm_resource_group.this: Refreshing state... [id=]
[2023-03-01T12:54:26 #1963584 terraspace plan ]: data.azurerm_client_config.this: Read complete after 0s [id=Y2xpZW50Q29uZmlncy9jbGllbnRJZD02ODI1NTdmYS0zYjFmLTQzODItYmQyOS01ZjZhOTk4NjVjNWM7b2JqZWN0SWQ9YmY3MTIxZmQtOTY5Yy00OGVkLWIxODctOTdhYzQwYmQ4NzA2O3N1YnNjcmlwdGlvbklkPWFiY2RkMGE3LTg0ZmYtNGM5Yy1iMDY2LTY3OGY5MTQyOWQwNTt0ZW5hbnRJZD01NTFlYmU3Yy00NzdkLTQ2MDctYjlhNi0xMDFlZTM2NWU3NzU=]
[2023-03-01T12:54:26 #1963584 terraspace plan ]: module.content_notification_sbus.module.this["edu-"].azurerm_servicebus_namespace.this: Refreshing state... [id=]
...