|
2 | 2 |
|
3 | 3 | <!-- markdownlint-disable --> |
4 | 4 | <a href="https://cpco.io/homepage"><img src="https://github.com/cloudposse/terraform-aws-cloudtrail-s3-bucket/blob/main/.github/banner.png?raw=true" alt="Project Banner"/></a><br/> |
5 | | - <p align="right"> |
6 | | -<a href="https://github.com/cloudposse/terraform-aws-cloudtrail-s3-bucket/releases/latest"><img src="https://img.shields.io/github/release/cloudposse/terraform-aws-cloudtrail-s3-bucket.svg?style=for-the-badge" alt="Latest Release"/></a><a href="https://github.com/cloudposse/terraform-aws-cloudtrail-s3-bucket/commits"><img src="https://img.shields.io/github/last-commit/cloudposse/terraform-aws-cloudtrail-s3-bucket.svg?style=for-the-badge" alt="Last Updated"/></a><a href="https://slack.cloudposse.com"><img src="https://slack.cloudposse.com/for-the-badge.svg" alt="Slack Community"/></a></p> |
| 5 | + |
| 6 | + |
| 7 | +<p align="right"><a href="https://github.com/cloudposse/terraform-aws-cloudtrail-s3-bucket/releases/latest"><img src="https://img.shields.io/github/release/cloudposse/terraform-aws-cloudtrail-s3-bucket.svg?style=for-the-badge" alt="Latest Release"/></a><a href="https://github.com/cloudposse/terraform-aws-cloudtrail-s3-bucket/commits"><img src="https://img.shields.io/github/last-commit/cloudposse/terraform-aws-cloudtrail-s3-bucket.svg?style=for-the-badge" alt="Last Updated"/></a><a href="https://cloudposse.com/slack"><img src="https://slack.cloudposse.com/for-the-badge.svg" alt="Slack Community"/></a><a href="https://cloudposse.com/support/"><img src="https://img.shields.io/badge/Get_Support-success.svg?style=for-the-badge" alt="Get Support"/></a> |
| 8 | + |
| 9 | +</p> |
7 | 10 | <!-- markdownlint-restore --> |
8 | 11 |
|
9 | 12 | <!-- |
@@ -83,18 +86,6 @@ module "s3_bucket" { |
83 | 86 |
|
84 | 87 |
|
85 | 88 |
|
86 | | -<!-- markdownlint-disable --> |
87 | | -## Makefile Targets |
88 | | -```text |
89 | | -Available targets: |
90 | | -
|
91 | | - help Help screen |
92 | | - help/all Display help for all targets |
93 | | - help/short This help short screen |
94 | | - lint Lint terraform code |
95 | | -
|
96 | | -``` |
97 | | -<!-- markdownlint-restore --> |
98 | 89 | <!-- markdownlint-disable --> |
99 | 90 | ## Requirements |
100 | 91 |
|
@@ -186,6 +177,11 @@ Available targets: |
186 | 177 | <!-- markdownlint-restore --> |
187 | 178 |
|
188 | 179 |
|
| 180 | + |
| 181 | + |
| 182 | + |
| 183 | + |
| 184 | + |
189 | 185 | ## Related Projects |
190 | 186 |
|
191 | 187 | Check out these related projects. |
@@ -258,7 +254,36 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow. |
258 | 254 | 5. **Push** your work back up to your fork |
259 | 255 | 6. Submit a **Pull Request** so that we can review your changes |
260 | 256 |
|
261 | | -**NOTE:** Be sure to merge the latest changes from "upstream" before making a pull request! |
| 257 | +**NOTE:** Be sure to merge the latest changes from "upstream" before making a pull request!## Running Terraform Tests |
| 258 | + |
| 259 | +We use [Atmos](https://atmos.tools) to streamline how Terraform tests are run. It centralizes configuration and wraps common test workflows with easy-to-use commands. |
| 260 | + |
| 261 | +All tests are located in the [`test/`](test) folder. |
| 262 | + |
| 263 | +Under the hood, tests are powered by Terratest together with our internal [Test Helpers](https://github.com/cloudposse/test-helpers) library, providing robust infrastructure validation. |
| 264 | + |
| 265 | +Setup dependencies: |
| 266 | +- Install Atmos ([installation guide](https://atmos.tools/install/)) |
| 267 | +- Install Go [1.24+ or newer](https://go.dev/doc/install) |
| 268 | +- Install Terraform or OpenTofu |
| 269 | + |
| 270 | +To run tests: |
| 271 | + |
| 272 | +- Run all tests: |
| 273 | + ```sh |
| 274 | + atmos test run |
| 275 | + ``` |
| 276 | +- Clean up test artifacts: |
| 277 | + ```sh |
| 278 | + atmos test clean |
| 279 | + ``` |
| 280 | +- Explore additional test options: |
| 281 | + ```sh |
| 282 | + atmos test --help |
| 283 | + ``` |
| 284 | +The configuration for test commands is centrally managed. To review what's being imported, see the [`atmos.yaml`](https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/.github/atmos/terraform-module.yaml) file. |
| 285 | + |
| 286 | +Learn more about our [automated testing in our documentation](https://docs.cloudposse.com/community/contribute/automated-testing/) or implementing [custom commands](https://atmos.tools/core-concepts/custom-commands/) with atmos. |
262 | 287 |
|
263 | 288 | ### 🌎 Slack Community |
264 | 289 |
|
|
0 commit comments