MitocGroup / recink

REciNK - Rethink Continuous Integration for JavaScript Applications
https://www.npmjs.org/package/recink
Mozilla Public License 2.0
14 stars 5 forks source link

Destroy doesn't work for recink run terraform #123

Closed eistrati closed 6 years ago

eistrati commented 6 years ago

Reference: http://jenkins.mitocgroup.com/job/Eistrati_Terraform_Demo/59/console

20:32:02 Error: Command failed: /mnt/data/jenkins/jobs/Eistrati_Terraform_Demo/workspace/bin/terraform show -no-color /mnt/data/jenkins/jobs/Eistrati_Terraform_Demo/workspace/ec2/.resource/terraform.tfstate
20:32:02 Error loading file: open /mnt/data/jenkins/jobs/Eistrati_Terraform_Demo/workspace/ec2/.resource/terraform.tfstate: no such file or directory
ddimitrioglo commented 6 years ago

https://github.com/MitocGroup/recink/pull/119/files#diff-7af29ce75da2e28462399f1ce89b3604R309

@eistrati take a look please

eistrati commented 6 years ago

@ddimitrioglo https://github.com/MitocGroup/recink/pull/119/files#diff-7af29ce75da2e28462399f1ce89b3604R309 ;)

ddimitrioglo commented 6 years ago

@eistrati what does it mean? can not see the difference.

eistrati commented 6 years ago

@ddimitrioglo It means that in order to run terraform destroy, you need to pass exactly the same parameters as in case of terraform apply. Therefore we need to pull the state to identify if tfstate is remote or local. Does this make sense?

ddimitrioglo commented 6 years ago

I think we have to do this before terraform destroy not after, what do you think?

avozicov commented 6 years ago

Test Passed Acceptance Criteria:

eistrati commented 6 years ago

Checked.