You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This is the README configuration for the Example module itself.
7
-
# Delete this (up to and including the line with `---`) and fill in
8
-
# the template below the dashes
9
-
10
-
# Name of this project
11
-
name: terraform-example-module
12
-
13
-
# License of this project
14
-
license: "APACHE2"
15
-
16
-
# Copyrights
17
-
copyrights:
18
-
- name: "Cloud Posse, LLC"
19
-
url: "https://cloudposse.com"
20
-
year: "2021"
21
-
22
-
# Canonical GitHub repo
23
-
github_repo: cloudposse/terraform-example-module
24
-
25
-
description: |-
26
-
This is an example project to provide all the scaffolding for a typical well-built Cloud Posse
27
-
Terraform module for AWS resources. It's a template repository you can
28
-
use when creating new repositories. This is not a useful module by itself.
29
-
30
-
quickstart: |-
31
-
1. Use this repo as a template for a new repo.
32
-
2. Check out the new repo and create a `git` branch to work on.
33
-
3. Replace the Terraform code at the root of the repo with the code you want to publish.
34
-
4. Replace the code in `examples/complete` with Terraform code that will make a good automated test.
35
-
Please keep `context.tf` and `fixtures.us-east-2.tfvars` in place and change only `name`, leaving
36
-
`region`, `namespace`, `environment`, and `stage` as is. Provide outputs that will be useful for testing.
37
-
5. Update `test/src/examples_complete_test.go` to verify the outputs of running `terraform apply` on `examples/complete`.
38
-
6. Run `make github/init` to update the repo with the current Cloud Posse framework files (e.g. `CODEOWNERS`).
39
-
7. Run `make pr/auto-format` to format the Terraform code and generate documentation.
40
-
8. Commit everything to `git` and open your first PR on the new repo.
41
-
42
-
references:
43
-
- name: "Cloud Posse Documentation"
44
-
url: "https://docs.cloudposse.com"
45
-
description: "The Cloud Posse Developer Hub (documentation)"
46
-
- name: "Terraform Standard Module Structure"
47
-
description: "HashiCorp's standard module structure is a file and directory layout we recommend for reusable modules distributed in separate repositories."
description: "HashiCorp's guidance on all the requirements for publishing a module. Meeting the requirements for publishing a module is extremely easy."
# List any related terraform modules that this module may be used with or that this module depends on.
108
40
related:
109
-
- name: "terraform-null-label"
110
-
description: "Terraform module designed to generate consistent names and tags for resources. Use terraform-null-label to implement a strict naming convention."
This module deploys a [lambda function](https://github.com/cloudposse/lambda-github-action-token-rotator) that runs as
60
+
a GitHub Application and periodically gets a new GitHub Runner Registration Token from the GitHub API. This token is
61
+
then stored in AWS Systems Manager Parameter Store.
120
62
121
63
# Introduction to the project
122
-
introduction: |-
123
-
This is an introduction.
64
+
#introduction: |-
65
+
# This is an introduction.
124
66
125
-
# How to use this module. Should be an easy example to copy and paste.
67
+
# How to use this project
126
68
usage: |-
127
-
For a complete example, see [examples/complete](examples/complete).
128
-
129
-
For automated tests of the complete example using [bats](https://github.com/bats-core/bats-core) and [Terratest](https://github.com/gruntwork-io/terratest)
130
-
(which tests and deploys the example on AWS), see [test](test).
131
-
132
69
```hcl
133
-
# Create a standard label resource. See [null-label](https://github.com/cloudposse/terraform-null-label/#terraform-null-label--)
134
-
module "label" {
135
-
source = "cloudposse/label/null"
136
-
# Cloud Posse recommends pinning every module to a specific version, though usually you want to use the current one
137
-
# version = "x.x.x"
138
-
139
-
namespace = "eg"
140
-
name = "example"
141
-
}
142
-
143
-
module "example" {
144
-
source = "cloudposse/*****/aws"
145
-
# Cloud Posse recommends pinning every module to a specific version
0 commit comments