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: patch state 'planned' outputs and perform minor refactor #52004

Merged
merged 8 commits into from Feb 26, 2019

Conversation

banthaherder
Copy link
Contributor

@banthaherder banthaherder commented Feb 9, 2019

SUMMARY

Patches state == 'planned' command output and stdout by refactoring the plan/apply/destroy process to explicitly provide outputs. Minor refactoring was done to enable the command output without overriding the situation where state == 'present' but no plan file was specified.

In addition, I added the project_path when checking for the plan file. Before it would fail due to os.path.exists checking at the top level directory where the ansible-playbook command was ran and the module.run_command executing within the project directory. This created the need for the plan file to be duplicated at the top level directory (for checking purposes) and relative to your project_path.

Fixes #39689, addresses #43405

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

terraform

@ansibot
Copy link
Contributor

ansibot commented Feb 9, 2019

cc @ryansb
click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. cloud community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. support:community This issue/PR relates to code supported by the Ansible community. labels Feb 9, 2019
@ansibot

This comment has been minimized.

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Feb 9, 2019
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Feb 9, 2019
@ansibot ansibot removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Feb 9, 2019
@ansibot

This comment has been minimized.

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Feb 10, 2019
@ansibot

This comment has been minimized.

@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Feb 10, 2019
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Feb 11, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Feb 19, 2019
@gundalow gundalow changed the title patch state 'planned' outputs and perform minor refactor terraform: patch state 'planned' outputs and perform minor refactor Feb 21, 2019
@gundalow
Copy link
Contributor

@mohitkumarsharmaflux7 Hi, does this address #39689 which you raised
@Titerote does this address #43405 which you raised?

@gundalow
Copy link
Contributor

@wrsuarez thank you for your feedback in #39689 (comment) Does this PR resolve the issue for you?

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Feb 21, 2019
@ghost
Copy link

ghost commented Feb 21, 2019 via email

@gundalow
Copy link
Contributor

@banthaherder Thank you for this PR, your first I believe.
Could you please add a bug fix changelog/fragment https://docs.ansible.com/ansible/devel/community/development_process.html#making-your-pr-merge-worthy then I'll get this merged

@mohitkumarsharmaflux7 Thank you for the quick feedback!

@ghost
Copy link

ghost commented Feb 21, 2019 via email

@gundalow
Copy link
Contributor

@mohitkumarsharmaflux7 Just waiting for a changelog to be added then I'll merge and backport

@gundalow gundalow self-assigned this Feb 22, 2019
@ghost
Copy link

ghost commented Feb 22, 2019 via email

@banthaherder
Copy link
Contributor Author

@gundalow I've added the changelog 👍

@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Feb 22, 2019
@gundalow gundalow merged commit 6f585b6 into ansible:devel Feb 26, 2019
@gundalow
Copy link
Contributor

Merged into devel for release in Ansible 2.8.
@banthaherder if you'd like this fixed in the next Ansible 2.7 release could you please raise a backport PR https://docs.ansible.com/ansible/devel/community/development_process.html#making-your-pr-merge-worthy Thanks in advance.

@ansible ansible locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. cloud community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. new_contributor This PR is the first contribution by a new community member. support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

terraform module not returning plan as output and also not showing correct command as return value
3 participants