Skip to content

Commit 990e7d8

Browse files
docs: add deployment example for splunk deployment (#35)
1 parent 8dac1c3 commit 990e7d8

File tree

30 files changed

+830
-9
lines changed

30 files changed

+830
-9
lines changed

examples/deployments/forge-eks/terragrunt/environments/terragrunt.hcl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# Global settings for all environments. Not too many, since we use different
2-
# SL AWS accounts for each environment.
3-
41
# We use for enabling safety hooks. They're in place to prevent an accident "tf
52
# run-all apply" for a non-dev environment.
63
terraform {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
api_version: v1
3+
product: Forge
4+
version: v1.0.0
5+
metadata:
6+
use_local_repos: true
7+
spec:
8+
# Versions of our IaC/Terraform modules.
9+
iac:
10+
modules:
11+
forge_runners:
12+
local_path: ../forge
13+
repo: git@github.com:cisco-open/forge.git
14+
module_path: modules/platform/forge_runners
15+
ref: main
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
locals {
2+
team_name = "forgeMT" # <REPLACE WITH YOUR VALUE> # e.g., "DevOps Team"
3+
product_name = "forgeMT" # <REPLACE WITH YOUR VALUE> # e.g., "Internal Platform"
4+
project_name = "forgemt" # <REPLACE WITH YOUR VALUE> # e.g., "intplat"
5+
aws_account_prefix = "forge" # <REPLACE WITH YOUR VALUE> # e.g., "intplat-ops"
6+
7+
# GitHub organization for GitOps repo.
8+
git_org = "forgemt" # <REPLACE WITH YOUR VALUE> e.g., "my-org"
9+
10+
# Team information.
11+
group_email = "forgemt@cisco.com" # <REPLACE WITH YOUR VALUE> e.g., "devops@example.com"
12+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
locals {
2+
# ─────────────────────────────────────────────────────────────────────────────
3+
# Global Settings
4+
# ─────────────────────────────────────────────────────────────────────────────
5+
global_data = read_terragrunt_config(find_in_parent_folders("_global_settings/_global.hcl"))
6+
group_email = local.global_data.locals.group_email
7+
team_name = local.global_data.locals.team_name
8+
product_name = local.global_data.locals.product_name
9+
project_name = local.global_data.locals.project_name
10+
11+
# ─────────────────────────────────────────────────────────────────────────────
12+
# Environment Settings
13+
# ─────────────────────────────────────────────────────────────────────────────
14+
env_data = read_terragrunt_config(find_in_parent_folders("_environment_wide_settings/_environment.hcl"))
15+
default_aws_region = local.env_data.locals.default_aws_region
16+
default_aws_profile = local.env_data.locals.default_aws_profile
17+
18+
# ─────────────────────────────────────────────────────────────────────────────
19+
# Tags
20+
# ─────────────────────────────────────────────────────────────────────────────
21+
tags = {
22+
TeamName = local.team_name
23+
TechnicalContact = local.group_email
24+
SecurityContact = local.group_email
25+
}
26+
27+
default_tags = {
28+
ApplicationName = local.project_name
29+
ResourceOwner = local.team_name
30+
ProductFamilyName = local.product_name
31+
IntendedPublic = "No"
32+
LastRevalidatedBy = "Terraform"
33+
LastRevalidatedAt = "2025-05-15"
34+
}
35+
36+
splunk_cloud = read_terragrunt_config(find_in_parent_folders("splunk_cloud_data_manager/config.hcl"))
37+
}
38+
39+
inputs = {
40+
# Core Environment
41+
aws_account_id = local.aws_account_id
42+
aws_profile = local.default_aws_profile
43+
aws_region = local.default_aws_region
44+
45+
# Splunk Cloud Configuration
46+
splunk_cloud = local.splunk_cloud.locals.splunk_cloud
47+
cloudformation_s3_config = local.splunk_cloud.locals.cloudformation_s3_config
48+
49+
# Splunk Cloud Data Manager Configuration
50+
cloudwatch_log_groups_config = local.splunk_cloud.locals.cloudwatch_log_groups_config
51+
security_metadata_config = local.splunk_cloud.locals.security_metadata_config
52+
53+
# Misc
54+
tags = local.tags
55+
default_tags = local.default_tags
56+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
locals {
2+
# ─────────────────────────────────────────────────────────────────────────────
3+
# Global Settings
4+
# ─────────────────────────────────────────────────────────────────────────────
5+
global_data = read_terragrunt_config(find_in_parent_folders("_global_settings/_global.hcl"))
6+
group_email = local.global_data.locals.group_email
7+
team_name = local.global_data.locals.team_name
8+
product_name = local.global_data.locals.product_name
9+
project_name = local.global_data.locals.project_name
10+
11+
# ─────────────────────────────────────────────────────────────────────────────
12+
# Environment Settings
13+
# ─────────────────────────────────────────────────────────────────────────────
14+
env_data = read_terragrunt_config(find_in_parent_folders("_environment_wide_settings/_environment.hcl"))
15+
default_aws_region = local.env_data.locals.default_aws_region
16+
default_aws_profile = local.env_data.locals.default_aws_profile
17+
18+
# ─────────────────────────────────────────────────────────────────────────────
19+
# Tags
20+
# ─────────────────────────────────────────────────────────────────────────────
21+
tags = {
22+
TeamName = local.team_name
23+
TechnicalContact = local.group_email
24+
SecurityContact = local.group_email
25+
}
26+
27+
default_tags = {
28+
ApplicationName = local.project_name
29+
ResourceOwner = local.team_name
30+
ProductFamilyName = local.product_name
31+
IntendedPublic = "No"
32+
LastRevalidatedBy = "Terraform"
33+
LastRevalidatedAt = "2025-05-15"
34+
}
35+
36+
splunk_cloud = read_terragrunt_config(find_in_parent_folders("splunk_cloud_data_manager_deps/config.hcl"))
37+
}
38+
39+
inputs = {
40+
# Core Environment
41+
aws_account_id = local.aws_account_id
42+
aws_profile = local.default_aws_profile
43+
aws_region = local.default_aws_region
44+
45+
# Splunk Cloud Configuration
46+
splunk_cloud = local.splunk_cloud.locals.splunk_cloud
47+
48+
# Misc
49+
tags = local.tags
50+
default_tags = local.default_tags
51+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
locals {
2+
# ─────────────────────────────────────────────────────────────────────────────
3+
# Global Settings
4+
# ─────────────────────────────────────────────────────────────────────────────
5+
global_data = read_terragrunt_config(find_in_parent_folders("_global_settings/_global.hcl"))
6+
group_email = local.global_data.locals.group_email
7+
team_name = local.global_data.locals.team_name
8+
product_name = local.global_data.locals.product_name
9+
project_name = local.global_data.locals.project_name
10+
11+
# ─────────────────────────────────────────────────────────────────────────────
12+
# Environment Settings
13+
# ─────────────────────────────────────────────────────────────────────────────
14+
env_data = read_terragrunt_config(find_in_parent_folders("_environment_wide_settings/_environment.hcl"))
15+
default_aws_region = local.env_data.locals.default_aws_region
16+
default_aws_profile = local.env_data.locals.default_aws_profile
17+
18+
# ─────────────────────────────────────────────────────────────────────────────
19+
# Tags
20+
# ─────────────────────────────────────────────────────────────────────────────
21+
tags = {
22+
TeamName = local.team_name
23+
TechnicalContact = local.group_email
24+
SecurityContact = local.group_email
25+
}
26+
27+
default_tags = {
28+
ApplicationName = local.project_name
29+
ResourceOwner = local.team_name
30+
ProductFamilyName = local.product_name
31+
IntendedPublic = "No"
32+
LastRevalidatedBy = "Terraform"
33+
LastRevalidatedAt = "2025-05-15"
34+
}
35+
36+
splunk_integration = read_terragrunt_config(find_in_parent_folders("splunk_o11y_integration/config.hcl"))
37+
}
38+
39+
inputs = {
40+
# Core Environment
41+
aws_account_id = local.aws_account_id
42+
aws_profile = local.default_aws_profile
43+
aws_region = local.default_aws_region
44+
45+
# Splunk O11y Integration Configuration
46+
integration_name = local.splunk_integration.locals.integration_name
47+
integration_regions = local.splunk_integration.locals.integration_regions
48+
splunk_api_url = "https://api.us0.signalfx.com" # <REPLACE WITH YOUR VALUE>
49+
splunk_organization_id = "ORG1234567890" # <REPLACE WITH YOUR VALUE>
50+
51+
# Misc
52+
tags = local.tags
53+
default_tags = local.default_tags
54+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
locals {
2+
# ─────────────────────────────────────────────────────────────────────────────
3+
# Global Settings
4+
# ─────────────────────────────────────────────────────────────────────────────
5+
global_data = read_terragrunt_config(find_in_parent_folders("_global_settings/_global.hcl"))
6+
group_email = local.global_data.locals.group_email
7+
team_name = local.global_data.locals.team_name
8+
product_name = local.global_data.locals.product_name
9+
project_name = local.global_data.locals.project_name
10+
11+
# ─────────────────────────────────────────────────────────────────────────────
12+
# Environment Settings
13+
# ─────────────────────────────────────────────────────────────────────────────
14+
env_data = read_terragrunt_config(find_in_parent_folders("_environment_wide_settings/_environment.hcl"))
15+
default_aws_region = local.env_data.locals.default_aws_region
16+
default_aws_profile = local.env_data.locals.default_aws_profile
17+
18+
# ─────────────────────────────────────────────────────────────────────────────
19+
# Region Settings.
20+
# ─────────────────────────────────────────────────────────────────────────────
21+
region_data = read_terragrunt_config(find_in_parent_folders("_region_wide_settings/_region.hcl"))
22+
region = local.region_data.locals.region_aws
23+
24+
# ─────────────────────────────────────────────────────────────────────────────
25+
# Tags
26+
# ─────────────────────────────────────────────────────────────────────────────
27+
tags = {
28+
TeamName = local.team_name
29+
TechnicalContact = local.group_email
30+
SecurityContact = local.group_email
31+
}
32+
33+
default_tags = {
34+
ApplicationName = local.project_name
35+
ResourceOwner = local.team_name
36+
ProductFamilyName = local.product_name
37+
IntendedPublic = "No"
38+
LastRevalidatedBy = "Terraform"
39+
LastRevalidatedAt = "2025-05-15"
40+
}
41+
42+
splunk_integration = read_terragrunt_config(find_in_parent_folders("splunk_o11y_regional_integration/config.hcl"))
43+
}
44+
45+
inputs = {
46+
# Core Environment
47+
aws_account_id = local.aws_account_id
48+
aws_profile = local.default_aws_profile
49+
aws_region = local.default_aws_region
50+
51+
# Splunk O11y Integration Configuration
52+
splunk_ingest_url = local.splunk_integration.locals.splunk_ingest_url
53+
template_url = local.splunk_integration.locals.template_url
54+
55+
# Misc
56+
tags = local.tags
57+
default_tags = local.default_tags
58+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
locals {
2+
# ─────────────────────────────────────────────────────────────────────────────
3+
# Global Settings
4+
# ─────────────────────────────────────────────────────────────────────────────
5+
global_data = read_terragrunt_config(find_in_parent_folders("_global_settings/_global.hcl"))
6+
group_email = local.global_data.locals.group_email
7+
team_name = local.global_data.locals.team_name
8+
product_name = local.global_data.locals.product_name
9+
project_name = local.global_data.locals.project_name
10+
11+
# ─────────────────────────────────────────────────────────────────────────────
12+
# Environment Settings
13+
# ─────────────────────────────────────────────────────────────────────────────
14+
env_data = read_terragrunt_config(find_in_parent_folders("_environment_wide_settings/_environment.hcl"))
15+
default_aws_region = local.env_data.locals.default_aws_region
16+
default_aws_profile = local.env_data.locals.default_aws_profile
17+
18+
# ─────────────────────────────────────────────────────────────────────────────
19+
# Region Settings.
20+
# ─────────────────────────────────────────────────────────────────────────────
21+
region_data = read_terragrunt_config(find_in_parent_folders("_region_wide_settings/_region.hcl"))
22+
region = local.region_data.locals.region_aws
23+
24+
# ─────────────────────────────────────────────────────────────────────────────
25+
# Tags
26+
# ─────────────────────────────────────────────────────────────────────────────
27+
tags = {
28+
TeamName = local.team_name
29+
TechnicalContact = local.group_email
30+
SecurityContact = local.group_email
31+
}
32+
33+
default_tags = {
34+
ApplicationName = local.project_name
35+
ResourceOwner = local.team_name
36+
ProductFamilyName = local.product_name
37+
IntendedPublic = "No"
38+
LastRevalidatedBy = "Terraform"
39+
LastRevalidatedAt = "2025-05-15"
40+
}
41+
42+
eks_settings_data = read_terragrunt_config(find_in_parent_folders("splunk_otel_eks/config.hcl"))
43+
}
44+
45+
inputs = {
46+
# Core Environment
47+
aws_profile = local.default_aws_profile
48+
aws_region = local.region
49+
50+
# Splunk OTel EKS Configuration
51+
cluster_name = local.eks_settings_data.locals.cluster_name
52+
splunk_otel_collector = local.eks_settings_data.locals.splunk_otel_collector
53+
54+
# Misc
55+
default_tags = local.default_tags
56+
}

0 commit comments

Comments
 (0)