generated from cloudposse/terraform-example-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.yaml
171 lines (138 loc) · 6.57 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
########################################################################################################################
########################################################################################################################
########################################################################################################################
# DELETE ME
#
# This is the README configuration for the Example module itself.
# Delete this (up to and including the line with `---`) and fill in
# the template below the dashes
# Name of this project
name: terraform-example-module
# License of this project
license: "APACHE2"
# Copyrights
copyrights:
- name: "Cloud Posse, LLC"
url: "https://cloudposse.com"
year: "2021"
# Canonical GitHub repo
github_repo: cloudposse/terraform-example-module
description: |-
This is an example project to provide all the scaffolding for a typical well-built Cloud Posse
Terraform module for AWS resources. It's a template repository you can
use when creating new repositories. This is not a useful module by itself.
quickstart: |-
1. Use this repo as a template for a new repo.
2. Check out the new repo and create a `git` branch to work on.
3. Replace the Terraform code at the root of the repo with the code you want to publish.
4. Replace the code in `examples/complete` with Terraform code that will make a good automated test.
Please keep `context.tf` and `fixtures.us-east-2.tfvars` in place and change only `name`, leaving
`region`, `namespace`, `environment`, and `stage` as is. Provide outputs that will be useful for testing.
5. Update `test/src/examples_complete_test.go` to verify the outputs of running `terraform apply` on `examples/complete`.
6. Run `make github/init` to update the repo with the current Cloud Posse framework files (e.g. `CODEOWNERS`).
7. Run `make pr/auto-format` to format the Terraform code and generate documentation.
8. Commit everything to `git` and open your first PR on the new repo.
references:
- name: "Cloud Posse Documentation"
url: "https://docs.cloudposse.com"
description: "The Cloud Posse Developer Hub (documentation)"
- name: "Terraform Standard Module Structure"
description: "HashiCorp's standard module structure is a file and directory layout we recommend for reusable modules distributed in separate repositories."
url: "https://www.terraform.io/docs/language/modules/develop/structure.html"
- name: "Terraform Module Requirements"
description: "HashiCorp's guidance on all the requirements for publishing a module. Meeting the requirements for publishing a module is extremely easy."
url: "https://www.terraform.io/docs/registry/modules/publish.html#requirements"
- name: "Terraform Version Pinning"
description: "The required_version setting can be used to constrain which versions of the Terraform CLI can be used with your configuration"
url: "https://www.terraform.io/docs/language/settings/index.html#specifying-a-required-terraform-version"
related:
- name: "Example App"
url: "https://github.com/cloudposse/example-app"
description: "Example application for CI/CD demonstrations of Codefresh"
---
# DELETE ME
#
# The above is the README configuration for the Example module itself.
# Delete from here to the top of file and fill in the template below
########################################################################################################################
########################################################################################################################
########################################################################################################################
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name:
# Logo for this project
#logo: docs/logo.png
# License of this project
license: "APACHE2"
# Copyrights
copyrights:
- name: "Cloud Posse, LLC"
url: "https://cloudposse.com"
year: "2021"
# Canonical GitHub repo
github_repo:
# Badges to display
badges:
- name: "Latest Release"
image: "https://img.shields.io/github/release/cloudposse/terraform-example-module.svg"
url: "https://github.com/cloudposse/terraform-example-module/releases/latest"
- name: "Slack Community"
image: "https://slack.cloudposse.com/badge.svg"
url: "https://slack.cloudposse.com"
- name: "Discourse Forum"
image: "https://img.shields.io/discourse/https/ask.sweetops.com/posts.svg"
url: "https://ask.sweetops.com/"
# List any related terraform modules that this module may be used with or that this module depends on.
related:
- name: "terraform-null-label"
description: "Terraform module designed to generate consistent names and tags for resources. Use terraform-null-label to implement a strict naming convention."
url: "https://github.com/cloudposse/terraform-null-label"
# List any resources helpful for someone to get started. For example, link to the hashicorp documentation or AWS documentation.
references:
# Short description of this project
description: |-
Short
description
# Introduction to the project
introduction: |-
This is an introduction.
# How to use this module. Should be an easy example to copy and paste.
usage: |-
For a complete example, see [examples/complete](examples/complete).
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).
```hcl
# Create a standard label resource. See [null-label](https://github.com/cloudposse/terraform-null-label/#terraform-null-label--)
module "label" {
source = "cloudposse/label/null"
# Cloud Posse recommends pinning every module to a specific version, though usually you want to use the current one
# version = "x.x.x"
namespace = "eg"
name = "example"
}
module "example" {
source = "cloudposse/*****/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
example = "Hello world!"
context = module.label.this
}
```
# Example usage
examples: |-
Here is an example of using this module:
- [`examples/complete`](https://github.com/cloudposse/terraform-example-module/) - complete example of using this module
# How to get started quickly
quickstart: |-
Here's how to get started...
# Other files to include in this README from the project folder
include:
- "docs/targets.md"
- "docs/terraform.md"
# Contributors to this project
contributors:
- name: "Erik Osterman"
github: "osterman"