Skip to content

Commit 0531d74

Browse files
committed
logging example
1 parent 0951672 commit 0531d74

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Backend Example with external Logging
2+
Creates resources for a secure backend in AWS
3+
4+
5+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
6+
## Requirements
7+
8+
No requirements.
9+
10+
## Providers
11+
12+
No provider.
13+
14+
## Inputs
15+
16+
No input.
17+
18+
## Outputs
19+
20+
No output.
21+
22+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/external-logging/main.tf

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
locals {
3+
env = "sandbox"
4+
name = "example"
5+
namespace = "aws-rhythmic-sandbox"
6+
owner = "Rhythmictech Engineering"
7+
region = "us-east-1"
8+
9+
extra_tags = {
10+
delete_me = "please"
11+
purpose = "testing"
12+
}
13+
}
14+
15+
module "tags" {
16+
source = "rhythmictech/tags/terraform"
17+
version = "1.0.0"
18+
19+
names = [local.name, local.env, local.namespace]
20+
21+
tags = merge({
22+
"Env" = local.env,
23+
"Namespace" = local.namespace,
24+
"Owner" = local.owner
25+
}, local.extra_tags)
26+
}
27+
28+
module "bucket" {
29+
source = "rhythmictech/bucket/s3logging"
30+
version = "1.0.1"
31+
32+
bucket_suffix = "tfstate-logging"
33+
region = local.region
34+
}
35+
36+
module "backend" {
37+
source = "../.."
38+
39+
logging_target_bucket = module.bucket.s3logging_bucket_name
40+
region = local.region
41+
}

0 commit comments

Comments
 (0)