File tree Expand file tree Collapse file tree 2 files changed +58
-0
lines changed
Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ # Basic Backend Example
2+ Creates resources for a secure backend in AWS
3+
4+ <!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
5+ ## Requirements
6+
7+ No requirements.
8+
9+ ## Providers
10+
11+ | Name | Version |
12+ | ------| ---------|
13+ | aws | n/a |
14+
15+ ## Inputs
16+
17+ No input.
18+
19+ ## Outputs
20+
21+ No output.
22+
23+ <!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
Original file line number Diff line number Diff line change 1+ data "aws_caller_identity" "current" {}
2+ data "aws_region" "current" {}
3+
4+ locals {
5+ env = " sandbox"
6+ name = " example"
7+ namespace = " aws-rhythmic-sandbox"
8+ owner = " Rhythmictech Engineering"
9+
10+ extra_tags = {
11+ delete_me = " please"
12+ purpose = " testing"
13+ }
14+ }
15+
16+ module "tags" {
17+ source = " rhythmictech/tags/terraform"
18+ version = " 1.0.0"
19+
20+ names = [local . name , local . env , local . namespace ]
21+
22+ tags = merge ({
23+ " Env" = local.env,
24+ " Namespace" = local.namespace,
25+ " Owner" = local.owner
26+ }, local. extra_tags )
27+ }
28+
29+ module "backend" {
30+ source = " ../.."
31+
32+ bucket = " ${ data . aws_caller_identity . current . account_id } -${ data . aws_region . current . name } -${ module . tags . name } "
33+ region = data. aws_region . current . name
34+ tags = module. tags . tags
35+ }
You can’t perform that action at this time.
0 commit comments