Skip to content

Commit 0710df3

Browse files
authored
Generate readme for submodules (#362)
* Generate readme for submodules * Update readme command to use --chdir option
1 parent 75944e9 commit 0710df3

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Terraform module to provision an AWS CloudFront CDN with an S3 origin.
5050

5151
## Usage
5252

53+
5354
For a complete example, see [examples/complete](examples/complete).
5455

5556
For automated tests of the complete example using [bats](https://github.com/bats-core/bats-core) and [Terratest](https://github.com/gruntwork-io/terratest) (which tests and deploys the example on AWS), see [test](test).

atmos.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,28 @@
1010
# Import shared configuration used by all modules
1111
import:
1212
- https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/.github/atmos/terraform-module.yaml
13+
14+
commands:
15+
- name: readme
16+
steps:
17+
- "atmos docs generate readme"
18+
- "atmos docs generate readme --chdir modules/lambda@edge"
19+
20+
- name: test
21+
commands:
22+
- name: "init"
23+
description: Initialize tests
24+
steps:
25+
- "make -C test/src init"
26+
27+
- name: "run"
28+
description: Run tests
29+
steps:
30+
- "cd test/src && go mod tidy"
31+
- "cd test/src && go test -v -timeout 60m"
32+
33+
- name: "clean"
34+
description: Clean tests
35+
steps:
36+
- "make -C test/src clean"
37+
- "rm -rf examples/*/.terraform examples/*/.terraform.lock.hcl"

modules/lambda@edge/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
**
1919
** This file was automatically generated by the `cloudposse/build-harness`.
2020
** 1) Make all changes to `README.yaml`
21-
** 2) Run `make init` (you only need to do this once)
22-
** 3) Run`make readme` to rebuild this file.
21+
** 2) Install [atmos](https://atmos.tools/install/) (you only need to do this once)
22+
** 3) Run`atmos readme` to rebuild this file.
2323
**
2424
** (We maintain HUNDREDS of open source projects. This is how we maintain our sanity.)
2525
**
@@ -50,6 +50,7 @@ Submodule which creates Lambda@Edge functions to associate with the CloudFront d
5050

5151
## Usage
5252

53+
5354
The `lambda_function_association` output feeds in directly to the variable of the same name in the parent module.
5455

5556
> **Important**: An AWS Provider configured for us-east-1 must be passed to the module, as Lambda@Edge functions must exist
@@ -209,7 +210,8 @@ Check out these related projects.
209210
> - **Customer Workshops.** Engage with our team in weekly workshops, gaining insights and strategies to continuously improve and innovate.
210211
>
211212
> <a href="https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=commercial_support"><img alt="Request Quote" src="https://img.shields.io/badge/request%20quote-success.svg?style=for-the-badge"/></a>
212-
> </details>
213+
>
214+
</details>
213215
214216
## ✨ Contributing
215217

0 commit comments

Comments
 (0)