Skip to content

Commit 47a9712

Browse files
author
Ben Fortuna
committed
Added public sub-modules
1 parent 955ea77 commit 47a9712

File tree

37 files changed

+522
-0
lines changed

37 files changed

+522
-0
lines changed

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,39 @@ clean:
1111

1212
test:
1313
$(TERRAFORM) init && $(TERRAFORM) validate && \
14+
$(TERRAFORM) init modules/cloudfront-request-rewrite && $(TERRAFORM) validate modules/cloudfront-request-rewrite
15+
$(TERRAFORM) init modules/dynamodb-table-import && $(TERRAFORM) validate modules/dynamodb-table-import
16+
$(TERRAFORM) init modules/dynamodb-table-put && $(TERRAFORM) validate modules/dynamodb-table-put
17+
$(TERRAFORM) init modules/ec2-ami-deletion && $(TERRAFORM) validate modules/ec2-ami-deletion
1418
$(TERRAFORM) init modules/ec2-instance-cycle && $(TERRAFORM) validate modules/ec2-instance-cycle
19+
$(TERRAFORM) init modules/iam-user-keyrotation && $(TERRAFORM) validate modules/iam-user-keyrotation
20+
$(TERRAFORM) init modules/rds-cluster-cycle && $(TERRAFORM) validate modules/rds-cluster-cycle
21+
$(TERRAFORM) init modules/rds-cluster-snapshot && $(TERRAFORM) validate modules/rds-cluster-snapshot
22+
$(TERRAFORM) init modules/rds-instance-cycle && $(TERRAFORM) validate modules/rds-instance-cycle
23+
$(TERRAFORM) init modules/rds-instance-snapshot && $(TERRAFORM) validate modules/rds-instance-snapshot
1524

1625
docs:
1726
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./ >./README.md && \
27+
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./modules/cloudfront-request-rewrite >./modules/cloudfront-request-rewrite/README.md
28+
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./modules/dynamodb-table-import >./modules/dynamodb-table-import/README.md
29+
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./modules/dynamodb-table-put >./modules/dynamodb-table-put/README.md
30+
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./modules/ec2-ami-deletion >./modules/ec2-ami-deletion/README.md
1831
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./modules/ec2-instance-cycle >./modules/ec2-instance-cycle/README.md
32+
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./modules/iam-user-keyrotation >./modules/iam-user-keyrotation/README.md
33+
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./modules/rds-cluster-cycle >./modules/rds-cluster-cycle/README.md
34+
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./modules/rds-cluster-snapshot >./modules/rds-cluster-snapshot/README.md
35+
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./modules/rds-instance-cycle >./modules/rds-instance-cycle/README.md
36+
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./modules/rds-instance-snapshot >./modules/rds-instance-snapshot/README.md
1937

2038
format:
2139
$(TERRAFORM) fmt -list=true ./ && \
40+
$(TERRAFORM) fmt -list=true ./modules/cloudfront-request-rewrite
41+
$(TERRAFORM) fmt -list=true ./modules/dynamodb-table-import
42+
$(TERRAFORM) fmt -list=true ./modules/dynamodb-table-put
43+
$(TERRAFORM) fmt -list=true ./modules/ec2-ami-deletion
2244
$(TERRAFORM) fmt -list=true ./modules/ec2-instance-cycle
45+
$(TERRAFORM) fmt -list=true ./modules/iam-user-keyrotation
46+
$(TERRAFORM) fmt -list=true ./modules/rds-cluster-cycle
47+
$(TERRAFORM) fmt -list=true ./modules/rds-cluster-snapshot
48+
$(TERRAFORM) fmt -list=true ./modules/rds-instance-cycle
49+
$(TERRAFORM) fmt -list=true ./modules/rds-instance-snapshot
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Requirements
2+
3+
No requirements.
4+
5+
## Providers
6+
7+
No provider.
8+
9+
## Inputs
10+
11+
| Name | Description | Type | Default | Required |
12+
|------|-------------|------|---------|:--------:|
13+
| environment | Environment variables to configure the Lambda function | `map(string)` | `{}` | no |
14+
| function\_name | Name of the Lambda function | `string` | `"cloudfront-request-rewrite"` | no |
15+
| role | IAM role assumed by the Lambda function | `string` | `"cloudfront-lambda-role"` | no |
16+
| runtime | A runtime to use for the function (leave blank to use default runtime) | `any` | `null` | no |
17+
18+
## Outputs
19+
20+
| Name | Description |
21+
|------|-------------|
22+
| function\_name | n/a |
23+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module "function" {
2+
source = "../.."
3+
4+
function_name = var.function_name
5+
template = "cloudfront-request-rewrite"
6+
runtime = var.runtime
7+
role = var.role
8+
environment = var.environment
9+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
output "function_name" {
2+
value = module.function.function_name
3+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
variable "function_name" {
2+
description = "Name of the Lambda function"
3+
default = "cloudfront-request-rewrite"
4+
}
5+
6+
variable "runtime" {
7+
description = "A runtime to use for the function (leave blank to use default runtime)"
8+
default = null
9+
}
10+
11+
variable "environment" {
12+
description = "Environment variables to configure the Lambda function"
13+
type = map(string)
14+
default = {}
15+
}
16+
17+
variable "role" {
18+
description = "IAM role assumed by the Lambda function"
19+
default = "cloudfront-lambda-role"
20+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Requirements
2+
3+
No requirements.
4+
5+
## Providers
6+
7+
No provider.
8+
9+
## Inputs
10+
11+
| Name | Description | Type | Default | Required |
12+
|------|-------------|------|---------|:--------:|
13+
| environment | Environment variables to configure the Lambda function | `map(string)` | `{}` | no |
14+
| function\_name | Name of the Lambda function | `string` | `"dynamodb-table-import"` | no |
15+
| role | IAM role assumed by the Lambda function | `string` | `"dynamodb-lambda-role"` | no |
16+
| runtime | A runtime to use for the function (leave blank to use default runtime) | `any` | `null` | no |
17+
18+
## Outputs
19+
20+
| Name | Description |
21+
|------|-------------|
22+
| function\_name | n/a |
23+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module "function" {
2+
source = "../.."
3+
4+
function_name = var.function_name
5+
template = "dynamodb-table-import"
6+
runtime = var.runtime
7+
role = var.role
8+
environment = var.environment
9+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
output "function_name" {
2+
value = module.function.function_name
3+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
variable "function_name" {
2+
description = "Name of the Lambda function"
3+
default = "dynamodb-table-import"
4+
}
5+
6+
variable "runtime" {
7+
description = "A runtime to use for the function (leave blank to use default runtime)"
8+
default = null
9+
}
10+
11+
variable "environment" {
12+
description = "Environment variables to configure the Lambda function"
13+
type = map(string)
14+
default = {}
15+
}
16+
17+
variable "role" {
18+
description = "IAM role assumed by the Lambda function"
19+
default = "dynamodb-lambda-role"
20+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Requirements
2+
3+
No requirements.
4+
5+
## Providers
6+
7+
No provider.
8+
9+
## Inputs
10+
11+
| Name | Description | Type | Default | Required |
12+
|------|-------------|------|---------|:--------:|
13+
| environment | Environment variables to configure the Lambda function | `map(string)` | `{}` | no |
14+
| function\_name | Name of the Lambda function | `string` | `"dynamodb-table-put"` | no |
15+
| role | IAM role assumed by the Lambda function | `string` | `"dynamodb-lambda-role"` | no |
16+
| runtime | A runtime to use for the function (leave blank to use default runtime) | `any` | `null` | no |
17+
18+
## Outputs
19+
20+
| Name | Description |
21+
|------|-------------|
22+
| function\_name | n/a |
23+

0 commit comments

Comments
 (0)