mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
2c825f04e7
terraform: remote state file exists check issue (#6296)
* remote state file exists check
In the official CLI implementation of Terraform, if the state file does not exist, a new one will be created, and there is no need to check that the state file already exists and with an error if file not exists.
```bash
# Test command
terraform apply -state test.tfstate. # if state file not exists ,terraform will create a new one
terraform destroy -state test1.tfstate ### Terraform will not throw any error, the command will succeed execute, only report no resource has destroy
```
* Update terraform.py
add 1 blank line to function end
* Create 6296-LanceNero-Terraform_statefile_check
remove file exists check (https://github.com/ansible-collections/community.general/pull/6296)
* resolve if case issue
* Add blank line
* Update 6296-LanceNero-Terraform_statefile_check
* Update changelogs/fragments/6296-LanceNero-Terraform_statefile_check
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* update code style
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* Update suffix to correct CI issue
* Update Code Style
* Update bug-fix to feature release
---------
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit
|
||
---|---|---|
.. | ||
.keep | ||
6199-archive-generate-checksum-in-chunks.yml | ||
6206-dconf-booleans.yml | ||
6212-pipx-include-injected.yml | ||
6259-redhat_subscription-fix-force.yaml | ||
6267-homebrew-cask-upgrade-all-greedy.yml | ||
6269-mksysb-output.yml | ||
6275-redhat_subscription-fix-environments-centos.yaml | ||
6277-add-topics-gitlab-project.yml | ||
6293-add-puppet-skip-tags-option.yaml | ||
6296-LanceNero-Terraform_statefile_check.yml | ||
6308-pipx-add-system-site-packages.yml |