Skip to content

Commit cff58f0

Browse files
Matt Calhounnitrocodecloudpossebot
authored
add account-settings module (#2)
Co-authored-by: nitrocode <nitrocode@users.noreply.github.com> Co-authored-by: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com>
1 parent 813f8b8 commit cff58f0

37 files changed

+2228
-434
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
# Cloud Posse must review any changes to standard context definition,
1717
# but some changes can be rubber-stamped.
18-
**/*.tf @cloudposse/engineering @cloudposse/approvers
19-
README.yaml @cloudposse/engineering @cloudposse/approvers
18+
**/*.tf @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
19+
README.yaml @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
2020
README.md @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
2121
docs/*.md @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
2222

.github/auto-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ version-resolver:
1717
- 'bugfix'
1818
- 'bug'
1919
- 'hotfix'
20+
- 'no-release'
2021
default: 'minor'
2122

2223
categories:
@@ -46,7 +47,7 @@ template: |
4647
4748
replacers:
4849
# Remove irrelevant information from Renovate bot
49-
- search: '/---\s+^#.*Renovate configuration(?:.|\n)*?This PR has been generated .*/gm'
50+
- search: '/(?<=---\s+)+^#.*(Renovate configuration|Configuration)(?:.|\n)*?This PR has been generated .*/gm'
5051
replace: ''
5152
# Remove Renovate bot banner image
5253
- search: '/\[!\[[^\]]*Renovate\][^\]]*\](\([^)]*\))?\s*\n+/gm'

.github/workflows/auto-release.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,24 @@ name: auto-release
33
on:
44
push:
55
branches:
6-
- master
6+
- main
7+
- master
8+
- production
79

810
jobs:
911
publish:
1012
runs-on: ubuntu-latest
1113
steps:
12-
# Drafts your next Release notes as Pull Requests are merged into "master"
13-
- uses: release-drafter/release-drafter@v5
14-
with:
15-
publish: true
16-
prerelease: false
17-
config-name: auto-release.yml
18-
env:
19-
GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
14+
# Get PR from merged commit to master
15+
- uses: actions-ecosystem/action-get-merged-pull-request@v1
16+
id: get-merged-pull-request
17+
with:
18+
github_token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
19+
# Drafts your next Release notes as Pull Requests are merged into "main"
20+
- uses: release-drafter/release-drafter@v5
21+
with:
22+
publish: ${{ !contains(steps.get-merged-pull-request.outputs.labels, 'no-release') }}
23+
prerelease: false
24+
config-name: auto-release.yml
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}

.github/workflows/validate-codeowners.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Validate Codeowners
22
on:
3+
workflow_dispatch:
4+
35
pull_request:
46

57
jobs:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*.tfstate.*
77
.terraform
88
.terraform.tfstate.lock.info
9+
.terraform.lock.hcl
910

1011
**/.idea
1112
**/*.iml

README.md

Lines changed: 89 additions & 71 deletions
Large diffs are not rendered by default.

README.yaml

Lines changed: 71 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -5,94 +5,111 @@
55
#
66

77
# Name of this project
8-
name: terraform-example-module
8+
name: terraform-aws-api-gateway
9+
10+
# Tags of this project
11+
tags:
12+
- terraform
13+
- terraform-modules
14+
- api-gateway
15+
- rest-api
16+
# Categories of this project
17+
categories:
18+
- terraform-modules/api-gateway
919

1020
# Logo for this project
1121
#logo: docs/logo.png
1222

1323
# License of this project
1424
license: "APACHE2"
1525

16-
# Copyrights
17-
copyrights:
18-
- name: "Cloud Posse, LLC"
19-
url: "https://cloudposse.com"
20-
year: "2020"
21-
2226
# Canonical GitHub repo
23-
github_repo: cloudposse/terraform-example-module
27+
github_repo: cloudposse/terraform-aws-api-gateway
2428

2529
# Badges to display
2630
badges:
2731
- name: "Latest Release"
28-
image: "https://img.shields.io/github/release/cloudposse/terraform-example-module.svg"
29-
url: "https://github.com/cloudposse/terraform-example-module/releases/latest"
32+
image: "https://img.shields.io/github/release/cloudposse/terraform-api-gateway-platform.svg"
33+
url: "https://github.com/cloudposse/terraform-api-gateway-platform/releases/latest"
3034
- name: "Slack Community"
3135
image: "https://slack.cloudposse.com/badge.svg"
3236
url: "https://slack.cloudposse.com"
33-
- name: "Discourse Forum"
34-
image: "https://img.shields.io/discourse/https/ask.sweetops.com/posts.svg"
35-
url: "https://ask.sweetops.com/"
3637

37-
# List any related terraform modules that this module may be used with or that this module depends on.
3838
related:
39-
- name: "terraform-null-label"
40-
description: "Terraform module designed to generate consistent names and tags for resources. Use terraform-null-label to implement a strict naming convention."
41-
url: "https://github.com/cloudposse/terraform-null-label"
42-
43-
# List any resources helpful for someone to get started. For example, link to the hashicorp documentation or AWS documentation.
44-
references:
45-
- name: "Terraform Standard Module Structure"
46-
description: "HashiCorp's standard module structure is a file and directory layout we recommend for reusable modules distributed in separate repositories."
47-
url: "https://www.terraform.io/docs/modules/index.html#standard-module-structure"
48-
- name: "Terraform Module Requirements"
49-
description: "HashiCorp's guidance on all the requirements for publishing a module. Meeting the requirements for publishing a module is extremely easy."
50-
url: "https://www.terraform.io/docs/registry/modules/publish.html#requirements"
51-
- name: "Terraform `random_integer` Resource"
52-
description: "The resource random_integer generates random values from a given range, described by the min and max attributes of a given resource."
53-
url: "https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/integer"
54-
- name: "Terraform Version Pinning"
55-
description: "The required_version setting can be used to constrain which versions of the Terraform CLI can be used with your configuration"
56-
url: "https://www.terraform.io/docs/configuration/terraform.html#specifying-a-required-terraform-version"
39+
- name: "terraform-yaml-config"
40+
description:
41+
"Terraform module to convert local and remote YAML configuration templates into Terraform lists and maps"
42+
url: "https://github.com/cloudposse/terraform-yaml-config"
5743

5844
# Short description of this project
5945
description: |-
60-
This is `terraform-example-module` project provides all the scaffolding for a typical well-built Cloud Posse module. It's a template repository you can
61-
use when creating new repositories.
46+
Terraform module to provision API Gatway resources.
47+
48+
The root module creates an API Gateway [REST API](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-rest-api.html)
49+
along with configuring tracing, logging, and metrics.
50+
51+
The module also consists of the following submodules:
52+
53+
- [account-settings](modules/account-settings) - to provision account-level settings for logging and metrics for API Gateway
54+
```
6255
63-
# Introduction to the project
6456
#introduction: |-
65-
# This is an introduction.
6657

67-
# How to use this module. Should be an easy example to copy and paste.
58+
references:
59+
- name: "API Gateway CloudWatch Logging"
60+
description:
61+
"To enable CloudWatch Logs, you must grant API Gateway permission to read and write logs to CloudWatch for your
62+
account."
63+
url: "https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html"
64+
65+
- name: "Create a monitor"
66+
description: "Create datadog monitors"
67+
url: "https://docs.datadoghq.com/api/v1/monitors/#create-a-monitor"
68+
69+
- name: "Terraform Datadog role resources"
70+
description: "Provides a Datadog role resource. Used to create and manage Datadog roles"
71+
url: "https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/role"
72+
73+
- name: "Datadog permissions"
74+
description:
75+
"Use this data source to retrieve the list of Datadog permissions by name and their corresponding ID, for use in
76+
the role resource"
77+
url: "https://registry.terraform.io/providers/DataDog/datadog/latest/docs/data-sources/permissions"
78+
79+
- name: "Role Based Access Control"
80+
description:
81+
"Roles categorize users and define what account permissions those users have, such as what data they can read or
82+
what account assets they can modify"
83+
url: "https://docs.datadoghq.com/account_management/rbac"
84+
85+
- name: "Managing Multiple-Organization Accounts"
86+
description:
87+
"It is possible to manage multiple child-organizations from one parent-organization account. This is typically
88+
used by Managed Service Providers that have customers which should not have access to each others' data"
89+
url: "https://docs.datadoghq.com/account_management/multi_organization"
90+
91+
# How to use this project
6892
usage: |-
69-
For a complete example, see [examples/complete](examples/complete).
70-
71-
For automated tests of the complete example using [bats](https://github.com/bats-core/bats-core) and [Terratest](https://github.com/gruntwork-io/terratest)
72-
(which tests and deploys the example on AWS), see [test](test).
93+
94+
Setup the account-level settings for logging and metrics for API Gateway:
7395
7496
```hcl
75-
module "example" {
76-
source = "https://github.com/cloudposse/terraform-example-module.git?ref=master"
77-
example = "Hello world!"
97+
module "api_gateway_account_settgings" {
98+
source = "cloudposse/api-gateway/aws//modules/account-settings"
99+
# version = "x.x.x"
100+
101+
context = module.this.context
78102
}
79103
```
80104
81-
# Example usage
82105
examples: |-
83-
Here is an example of using this module:
84-
- [`examples/complete`](https://github.com/cloudposse/terraform-example-module/) - complete example of using this module
85-
86-
# How to get started quickly
87-
#quickstart: |-
88-
# Here's how to get started...
106+
Review the [examples](examples) folder to see how to use the API Gateway modules.
89107
90-
# Other files to include in this README from the project folder
91108
include:
92109
- "docs/targets.md"
93110
- "docs/terraform.md"
94111

95112
# Contributors to this project
96113
contributors:
97-
- name: "Erik Osterman"
98-
github: "osterman"
114+
- name: "Matt Calhoun"
115+
github: "mcalhoun"

0 commit comments

Comments
 (0)