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
modules/terraform: Add workspace support #43489
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From terraform documentation: ``` The persistent data stored in the backend belongs to a workspace. Initially the backend has only one workspace, called "default", and thus there is only one Terraform state associated with that configuration. Certain backends support multiple named workspaces, allowing multiple states to be associated with a single configuration. The configuration still has only one backend, but multiple distinct instances of that configuration to be deployed without configuring a new backend or changing authentication credentials. ``` This patch introduces the `workspace` parameter in the terraform module. The module will select the workspace is it does not exists, or simply select it if it exists. Fixes #43134
…kspace context The `purge_workspace` parameter allows to remove a workspace when asking for state = absent. It allows to leave a clean state file without empty workspaces if the parameter is true. Also adding the support of a workspace context that allows to restore the workspace when that was active when the module started.
cc @ryansb |
ansibot
added
affects_2.7
This issue/PR affects Ansible v2.7
cloud
community_review
In order to be merged, this PR must follow the community review workflow.
feature
This issue/PR relates to a feature request.
module
This issue/PR relates to a module.
needs_triage
Needs a first human triage before being processed.
support:community
This issue/PR relates to code supported by the Ansible community.
labels
Jul 31, 2018
The test
|
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
Jul 31, 2018
ansibot
removed
the
ci_verified
Changes made in this PR are causing tests to fail.
label
Jul 31, 2018
webknjaz
removed
the
needs_triage
Needs a first human triage before being processed.
label
Jul 31, 2018
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
Jul 31, 2018
ryansb
approved these changes
Jul 31, 2018
@ryansb shall we merge ? |
ryansb
approved these changes
Aug 2, 2018
@rrey thank you for contributing this feature! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.7
This issue/PR affects Ansible v2.7
cloud
community_review
In order to be merged, this PR must follow the community review workflow.
feature
This issue/PR relates to a feature request.
module
This issue/PR relates to a module.
support:community
This issue/PR relates to code supported by the Ansible community.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
From terraform documentation:
This patch introduces the
workspace
parameter in the terraform module. The module will createthe workspace is it does not exists, or simply select it if it exists.
Fixes #43134
ISSUE TYPE
COMPONENT NAME
terraform
ANSIBLE VERSION