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

Terraform Plugin: When the Terraform apply fails the state is still saved #897

Open
brahammittal opened this issue Jan 4, 2024 · 1 comment
Labels
question Further information is requested

Comments

@brahammittal
Copy link

We are using the Vela Terraform plugin to create SAP BTP infrastructure. If we are getting an error in the apply step, still the state gets saved and we are not able to use the same file to create the infrastructure. We have to change the details on the file to make it work.

We are changing the resource ID in TF file. We have to change the parameters passed to the resource as well to make it work.

@brahammittal brahammittal added the bug Indicates a bug label Jan 4, 2024
@wass3r
Copy link
Collaborator

wass3r commented Jan 13, 2024

I don't believe this to be a bug. As far as I know, this is how terraform works, see https://developer.hashicorp.com/terraform/tutorials/cli/apply#errors-during-apply.

The plugin is just using your configuration and running terraform apply ... for you. You can check how the command for this is constructed here, if you're curious: https://github.com/go-vela/vela-terraform/blob/dfaaf57037ddec3078ad0ca4abbe4f7b2dcaa5d9/cmd/vela-terraform/apply.go#L53-L158. If you still believe there's an error in how that's done, please let us know and provide more detail on what sets of parameters you used and what you expected the final terraform command to look like versus what the plugin is doing.

I will change the bug label to question for now.

@wass3r wass3r added question Further information is requested and removed bug Indicates a bug labels Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants