Skip to content

Commit 323a344

Browse files
docs: fix splunk deployment example (#42)
* docs: fix splunk deployment example * docs: update deployment docs
1 parent e29e1a7 commit 323a344

File tree

43 files changed

+445
-176
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+445
-176
lines changed

docs/configurations/deployments/forge_eks.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@
22

33
This directory provides a working example of deploying **Forge EKS** using **Terragrunt** for layered configuration management.
44

5-
---
6-
75
## Module Overview
86

97
| Module | Description |
108
|--------|--------------------------------------------------------------------|
119
| `eks` | Configures an EKS cluster with Calico and Karpenter for networking and autoscaling |
1210

13-
---
14-
1511
## Prerequisites
1612

1713
Before deploying:
@@ -21,8 +17,6 @@ Before deploying:
2117
- Configure **AWS credentials** (`aws configure`) with the correct profile.
2218
- Ensure your IAM user/role has permissions to create EKS and related resources.
2319

24-
---
25-
2620
## 1. Prepare Config Files — Global and Environment
2721

2822
Copy these templates and place them at the correct paths:
@@ -52,8 +46,6 @@ examples/deployments/forge-eks/terragrunt/environments/<aws_account>/_environmen
5246

5347
**Be sure to replace all placeholder values (`<...>`) with your actual environment details.**
5448

55-
---
56-
5749
## 2. Prepare EKS Config File
5850

5951
Copy the EKS config template and place it at the correct path:
@@ -70,8 +62,6 @@ examples/deployments/forge-eks/terragrunt/environments/<aws_account>/regions/<aw
7062

7163
**Be sure to replace all placeholder values (`<...>`) with your actual environment details.**
7264

73-
---
74-
7565
## Deployment
7666

7767
To deploy all modules:
@@ -90,6 +80,4 @@ terragrunt plan
9080
terragrunt apply
9181
```
9282

93-
---
94-
9583
> For more advanced scenarios or troubleshooting, see the [full documentation](../index.md).

docs/configurations/deployments/forge_extras.md

Lines changed: 58 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
This directory contains example configurations for deploying **Forge infrastructure extras** using **Terragrunt** for layered configuration management.
44

5-
---
6-
75
## 📦 Module Overview
86

97
The following modules are included in this deployment:
@@ -16,37 +14,80 @@ The following modules are included in this deployment:
1614
| `forge_subscription` | Manages Forge subscription resources, allowing Forge runners to assume roles in tenant accounts and pull ECR images across accounts. Supports both self-subscription and tenant onboarding scenarios. |
1715
| `storage` | Provisions S3 buckets for integrations and data storage |
1816

19-
---
17+
## Prerequisites
18+
19+
Before deploying:
20+
21+
- Ensure you have an existing **VPC** and **subnets** in your AWS account.
22+
- Install [Terragrunt](https://terragrunt.gruntwork.io/) and [OpenTofu](https://opentofu.org/) (or Terraform).
23+
- Configure **AWS credentials** (`aws configure`) with the correct profile.
24+
- Ensure your IAM user/role has permissions to create EKS and related resources.
25+
26+
## 1. Prepare Config Files — Global and Environment
27+
28+
Copy these templates and place them at the correct paths:
29+
30+
### Templates to Copy
31+
32+
- `examples/templates/eks/_global_settings/_global.yaml`
33+
- `examples/templates/eks/_environment_wide_settings/_environment.yaml`
34+
35+
### Destination Paths
36+
37+
```
38+
examples/deployments/forge-extras/terragrunt/_global_settings/_global.yaml
39+
40+
examples/deployments/forge-extras/terragrunt/environments/<aws_account>/_environment_wide_settings/_environment.yaml
41+
```
42+
43+
### Edit the Config Files
44+
45+
- **_global.yaml**
46+
Set global values such as team name, product name, AWS account prefix, GitHub organization, and contact email.
47+
*(Path: `_global_settings/_global.yaml`)*
2048

21-
## 🛠️ Prerequisites
49+
- **_environment.yaml**
50+
Define environment-wide settings like environment name, AWS region, and account ID.
51+
*(Path: `environments/<aws_account>/_environment_wide_settings/_environment.yaml`)*
2252

23-
Before deploying, ensure you have:
53+
**Be sure to replace all placeholder values (`<...>`) with your actual environment details.**
2454

25-
- An existing **VPC** and **subnets** in your AWS account.
26-
- [Terragrunt](https://terragrunt.gruntwork.io/) and [OpenTofu](https://opentofu.org/) (or Terraform) installed.
27-
- **AWS credentials configured** (`aws configure`) with the correct profile.
28-
- IAM permissions to create and manage the required AWS resources.
29-
- All `<REPLACE WITH YOUR VALUE>` placeholders updated in:
30-
- `terragrunt/_global_settings/_global.hcl`
31-
- `terragrunt/environments/prod/_environment_wide_settings/_environment.hcl`
32-
- Any module-specific config files (e.g., `cloud_custodian.hcl`, `cloud_formation.hcl`, `ecr.hcl`, `forge_subscription.hcl`, `storage.hcl`)
55+
## 2. Prepare EKS Config File
3356

34-
---
57+
Copy the EKS config template and place it at the correct path:
3558

36-
## 🚀 How to Deploy
59+
### Template to Copy
60+
61+
- `examples/templates/extras/cloud_custodian/config.yaml`
62+
- `examples/templates/extras/ecr/config.yaml`
63+
- `examples/templates/extras/forge_subscription/config.yaml`
64+
65+
### Destination Path
66+
67+
```
68+
examples/deployments/forge-extras/terragrunt/environments/<aws_account>/cloud_custodian/config.yaml
69+
examples/deployments/forge-extras/terragrunt/environments/<aws_account>/ecr/config.yaml
70+
examples/deployments/forge-extras/terragrunt/environments/<aws_account>/forge_subscription/config.yaml
71+
```
72+
73+
**Be sure to replace all placeholder values (`<...>`) with your actual environment details.**
74+
75+
## Deployment
3776

3877
To deploy all modules:
3978

4079
```sh
41-
cd terragrunt/environments/prod/
80+
cd examples/deployments/forge-extras/terragrunt/environments/prod/
4281
terragrunt run-all plan
4382
terragrunt run-all apply
4483
```
4584

4685
To deploy a specific module (example for Cloud Custodian):
4786

4887
```sh
49-
cd terragrunt/environments/prod/cloud_custodian/
88+
cd examples/deployments/forge-extras/terragrunt/environments/prod/cloud_custodian/
5089
terragrunt plan
5190
terragrunt apply
5291
```
92+
93+
> For more advanced scenarios or troubleshooting, see the [full documentation](../index.md).

docs/configurations/deployments/splunk_deployment.md

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,57 @@
22

33
This directory provides a complete example for deploying **Forge Splunk integrations** using **Terragrunt** for layered configuration management.
44

5-
---
6-
75
## Module Overview
86

97
The following modules are included in this deployment:
108

119
| Module Name | Description |
1210
| ----------------------------------- | --------------------------------------------------------------------------- |
1311
| `splunk_cloud_data_manager` | Manages Splunk Cloud Data Manager integration for log ingestion and storage |
14-
| `splunk_cloud_data_manager_deps` | Handles dependencies for Splunk Cloud Data Manager |
15-
| `splunk_o11y_integration` | Integrates Splunk Observability Cloud for metrics and events |
16-
| `splunk_o11y_regional_integration` | Regional Splunk Observability integration |
12+
| `splunk_cloud_data_manager_common` | Handles dependencies for Splunk Cloud Data Manager |
13+
| `splunk_o11y_aws_integration_common` | Integrates Splunk Observability Cloud for metrics and events |
14+
| `splunk_o11y_integration` | Regional Splunk Observability integration |
1715
| `splunk_otel_eks` | Deploys Splunk OpenTelemetry Collector on EKS |
1816
| `splunk_secrets` | Provisions required Splunk secrets in AWS Secrets Manager |
1917

20-
---
21-
2218
## Prerequisites
2319

24-
Before deploying, ensure you have:
20+
Before deploying:
21+
22+
- Ensure you have an existing **VPC** and **subnets** in your AWS account.
23+
- Install [Terragrunt](https://terragrunt.gruntwork.io/) and [OpenTofu](https://opentofu.org/) (or Terraform).
24+
- Configure **AWS credentials** (`aws configure`) with the correct profile.
25+
- Ensure your IAM user/role has permissions to create EKS and related resources.
26+
27+
## 1. Prepare Config Files — Global and Environment
28+
29+
Copy these templates and place them at the correct paths:
30+
31+
### Templates to Copy
32+
33+
- `examples/templates/eks/_global_settings/_global.yaml`
34+
- `examples/templates/eks/_environment_wide_settings/_environment.yaml`
35+
36+
### Destination Paths
2537

26-
- An existing **VPC** and **subnets** in your AWS account.
27-
- [Terragrunt](https://terragrunt.gruntwork.io/) and [OpenTofu](https://opentofu.org/) (or Terraform) installed.
28-
- **AWS credentials configured** (`aws configure`) with the correct profile.
29-
- IAM permissions to create Secrets Manager, and related resources.
30-
- Replace **all** `<REPLACE WITH YOUR VALUE>` placeholders in these files:
31-
- `examples/deployments/splunk-deployment/terragrunt/_global_settings/_global.hcl`
32-
- `examples/deployments/splunk-deployment/terragrunt/environments/prod/_environment_wide_settings/_environment.hcl`
33-
- `examples/deployments/splunk-deployment/terragrunt/environments/prod/splunk_cloud_data_manager/config.hcl`
34-
- `examples/deployments/splunk-deployment/terragrunt/environments/prod/splunk_cloud_data_manager_deps/config.hcl`
35-
- `examples/deployments/splunk-deployment/terragrunt/environments/prod/splunk_o11y_integration/config.hcl`
36-
- `examples/deployments/splunk-deployment/terragrunt/environments/prod/splunk_secrets/config.hcl`
38+
```
39+
examples/deployments/forge-extras/terragrunt/_global_settings/_global.yaml
40+
41+
examples/deployments/forge-extras/terragrunt/environments/<aws_account>/_environment_wide_settings/_environment.yaml
42+
```
43+
44+
### Edit the Config Files
45+
46+
- **_global.yaml**
47+
Set global values such as team name, product name, AWS account prefix, GitHub organization, and contact email.
48+
*(Path: `_global_settings/_global.yaml`)*
49+
50+
- **_environment.yaml**
51+
Define environment-wide settings like environment name, AWS region, and account ID.
52+
*(Path: `environments/<aws_account>/_environment_wide_settings/_environment.yaml`)*
53+
54+
**Be sure to replace all placeholder values (`<...>`) with your actual environment details.**
3755

38-
---
3956

4057
## Secrets Setup
4158

@@ -52,8 +69,6 @@ terragrunt apply
5269

5370
After secrets are created, you may need to update their values in AWS Secrets Manager with your actual Splunk credentials and tokens.
5471

55-
---
56-
5772
## How to Deploy
5873

5974
To deploy all modules:

examples/deployments/splunk-deployment/release_versions.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@ spec:
88
# Versions of our IaC/Terraform modules.
99
iac:
1010
modules:
11-
splunk_cloud_data_manager_deps:
11+
splunk_cloud_data_manager_common:
1212
local_path: ../forge
1313
repo: git@github.com:cisco-open/forge.git
14-
module_path: modules/integrations/splunk_cloud_data_manager_deps
14+
module_path: modules/integrations/splunk_cloud_data_manager_common
1515
ref: main
1616
splunk_cloud_data_manager:
1717
local_path: ../forge
1818
repo: git@github.com:cisco-open/forge.git
1919
module_path: modules/integrations/splunk_cloud_data_manager
2020
ref: main
21-
splunk_o11y_integration:
21+
splunk_o11y_aws_integration_common:
2222
local_path: ../forge
2323
repo: git@github.com:cisco-open/forge.git
24-
module_path: modules/integrations/splunk_o11y_integration
24+
module_path: modules/integrations/splunk_o11y_aws_integration_common
2525
ref: main
26-
splunk_o11y_regional_integration:
26+
splunk_o11y_aws_integration:
2727
local_path: ../forge
2828
repo: git@github.com:cisco-open/forge.git
29-
module_path: modules/integrations/splunk_o11y_regional_integration
29+
module_path: modules/integrations/splunk_o11y_aws_integration
3030
ref: main
3131
splunk_otel_eks:
3232
local_path: ../forge
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
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"
2+
global = yamldecode(file("_global.yaml"))
63

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"
4+
team_name = local.global.team_name
5+
product_name = local.global.product_name
6+
project_name = local.global.project_name
7+
aws_account_prefix = local.global.aws_account_prefix
8+
git_org = local.global.git_org
9+
group_email = local.global.group_email
1210
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
team_name: forgeMT
3+
product_name: forgeMT
4+
project_name: forgemt
5+
aws_account_prefix: forge
6+
git_org: forgemt
7+
group_email: forgemt@cisco.com

examples/deployments/splunk-deployment/terragrunt/_global_settings/splunk_cloud_data_manager.hcl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ locals {
1414
env_data = read_terragrunt_config(find_in_parent_folders("_environment_wide_settings/_environment.hcl"))
1515
default_aws_region = local.env_data.locals.default_aws_region
1616
default_aws_profile = local.env_data.locals.default_aws_profile
17+
aws_account_id = local.env_data.locals.aws_account_id
1718

1819
# ─────────────────────────────────────────────────────────────────────────────
1920
# Tags
@@ -36,6 +37,12 @@ locals {
3637
splunk_cloud = read_terragrunt_config(find_in_parent_folders("splunk_cloud_data_manager/config.hcl"))
3738
}
3839

40+
dependencies {
41+
paths = [
42+
find_in_parent_folders("splunk_cloud_data_manager_common")
43+
]
44+
}
45+
3946
inputs = {
4047
# Core Environment
4148
aws_account_id = local.aws_account_id

examples/deployments/splunk-deployment/terragrunt/_global_settings/splunk_cloud_data_manager_deps.hcl renamed to examples/deployments/splunk-deployment/terragrunt/_global_settings/splunk_cloud_data_manager_common.hcl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ locals {
1414
env_data = read_terragrunt_config(find_in_parent_folders("_environment_wide_settings/_environment.hcl"))
1515
default_aws_region = local.env_data.locals.default_aws_region
1616
default_aws_profile = local.env_data.locals.default_aws_profile
17+
aws_account_id = local.env_data.locals.aws_account_id
1718

1819
# ─────────────────────────────────────────────────────────────────────────────
1920
# Tags
@@ -33,7 +34,14 @@ locals {
3334
LastRevalidatedAt = "2025-05-15"
3435
}
3536

36-
splunk_cloud = read_terragrunt_config(find_in_parent_folders("splunk_cloud_data_manager_deps/config.hcl"))
37+
splunk_cloud = read_terragrunt_config(find_in_parent_folders("splunk_cloud_data_manager_common/config.hcl"))
38+
39+
}
40+
41+
dependencies {
42+
paths = [
43+
find_in_parent_folders("splunk_secrets")
44+
]
3745
}
3846

3947
inputs = {

examples/deployments/splunk-deployment/terragrunt/_global_settings/splunk_o11y_regional_integration.hcl renamed to examples/deployments/splunk-deployment/terragrunt/_global_settings/splunk_o11y_aws_integration.hcl

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,19 @@ locals {
3939
LastRevalidatedAt = "2025-05-15"
4040
}
4141

42-
splunk_integration = read_terragrunt_config(find_in_parent_folders("splunk_o11y_regional_integration/config.hcl"))
42+
splunk_integration = read_terragrunt_config(find_in_parent_folders("splunk_o11y_aws_integration/config.hcl"))
43+
}
44+
45+
dependencies {
46+
paths = [
47+
find_in_parent_folders("splunk_o11y_aws_integration_common")
48+
]
4349
}
4450

4551
inputs = {
4652
# Core Environment
47-
aws_account_id = local.aws_account_id
48-
aws_profile = local.default_aws_profile
49-
aws_region = local.default_aws_region
53+
aws_profile = local.default_aws_profile
54+
aws_region = local.default_aws_region
5055

5156
# Splunk O11y Integration Configuration
5257
splunk_ingest_url = local.splunk_integration.locals.splunk_ingest_url

0 commit comments

Comments
 (0)