ansible-collections / cloud.terraform

The collection automates the management and provisioning of infrastructure as code (IaC) using the Terraform CLI tool within Ansible playbooks and Execution Environment runtimes.
GNU General Public License v3.0
100 stars 36 forks source link

Inventory terraform_state - supports groups #121

Closed akira6592 closed 8 months ago

akira6592 commented 8 months ago
SUMMARY

Supports groups.

---
plugin: cloud.terraform.terraform_state
backend_type: s3
backend_config:
  bucket: {{ bucket_name }}
  key: ansible/terraform.tfstate
  region: {{ aws_region }}
keyed_groups:
  - key: instance_state
    prefix: state
  - prefix: tag
    key: tags
groups:    # here
  no_public_ip: public_ip == ""
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION
softwarefactory-project-zuul[bot] commented 8 months ago

Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/28b063f3444b4ff0ae3e82c7bf36c371

:heavy_check_mark: ansible-galaxy-importer SUCCESS in 5m 05s :heavy_check_mark: build-ansible-collection SUCCESS in 8m 13s

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.55%. Comparing base (8c52bf2) to head (c43284a). Report is 9 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #121 +/- ## ========================================== + Coverage 73.00% 79.55% +6.55% ========================================== Files 16 23 +7 Lines 1015 1438 +423 Branches 182 253 +71 ========================================== + Hits 741 1144 +403 - Misses 243 252 +9 - Partials 31 42 +11 ``` | [Flag](https://app.codecov.io/gh/ansible-collections/cloud.terraform/pull/121/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ansible-collections) | Coverage Ξ” | | |---|---|---| | [sanity](https://app.codecov.io/gh/ansible-collections/cloud.terraform/pull/121/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ansible-collections) | `?` | | | [units](https://app.codecov.io/gh/ansible-collections/cloud.terraform/pull/121/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ansible-collections) | `79.55% <ΓΈ> (+6.94%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ansible-collections#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

akira6592 commented 8 months ago

@hakbailey Thank you for reviewing and approval. I'm looking forward to release this inventory plugin.

akira6592 commented 8 months ago

Thank you for merging

patchback[bot] commented 6 months ago

Backport to stable-2: πŸ’” cherry-picking failed β€” conflicts found

❌ Failed to cleanly apply da9b61ea4eb30c804ec97ce0f3af91cca6a3456b on top of patchback/backports/stable-2/da9b61ea4eb30c804ec97ce0f3af91cca6a3456b/pr-121

Backporting merged PR #121 into main

  1. Ensure you have a local repo clone of your fork. Unless you cloned it from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these instructions you'll refer to it by the name upstream. If you don't have it, here's how you can add it:
    $ git remote add upstream https://github.com/ansible-collections/cloud.terraform.git
  3. Ensure you have the latest copy of upstream and prepare a branch that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/stable-2/da9b61ea4eb30c804ec97ce0f3af91cca6a3456b/pr-121 upstream/stable-2
  4. Now, cherry-pick PR #121 contents into that branch:
    $ git cherry-pick -x da9b61ea4eb30c804ec97ce0f3af91cca6a3456b

    If it'll yell at you with something like fatal: Commit da9b61ea4eb30c804ec97ce0f3af91cca6a3456b is a merge but no -m option was given., add -m 1 as follows instead:

    $ git cherry-pick -m1 -x da9b61ea4eb30c804ec97ce0f3af91cca6a3456b
  5. At this point, you'll probably encounter some merge conflicts. You must resolve them in to preserve the patch from PR #121 as close to the original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/stable-2/da9b61ea4eb30c804ec97ce0f3af91cca6a3456b/pr-121
  7. Create a PR, ensure that the CI is green. If it's not β€” update it so that the tests and any other checks pass. This is it! Now relax and wait for the maintainers to process your pull request when they have some cycles to do reviews. Don't worry β€” they'll tell you if any improvements are necessary when the time comes!

πŸ€– @patchback I'm built with octomachinery and my source is open β€” https://github.com/sanitizers/patchback-github-app.