Skip to content

Commit 047c5d0

Browse files
committed
Update AWS integration examples with variable configurations
- Changed `resource_name_prefix` in `organization_integration.tf` to use a variable instead of a hardcoded value. - Added new variables for `regions_to_monitor`, `aws_region`, and `resource_name_prefix` in `variables.tf` for both organization and single account examples. - Updated `terraform.tfvars` files to include the new variables and their default values for better configurability.
1 parent 5f25b55 commit 047c5d0

5 files changed

Lines changed: 28 additions & 6 deletions

File tree

src/integrations/aws_integration_automation/examples/aws_organization/organization_integration.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module "jit_aws_org_integration" {
3636

3737
# Stack Configuration
3838
stack_name = "JitOrgIntegration"
39-
resource_name_prefix = "JitOrg" # Optional: Prefix for CloudFormation resources
39+
resource_name_prefix = var.resource_name_prefix # Optional: Prefix for CloudFormation resources
4040

4141
# CloudFormation Configuration
4242
capabilities = ["CAPABILITY_IAM", "CAPABILITY_NAMED_IAM", "CAPABILITY_AUTO_EXPAND"]

src/integrations/aws_integration_automation/examples/aws_organization/terraform.tfvars

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,12 @@ should_include_root_account = true
99

1010
# The organization's root ID - can be obtained under AWS Organizations -> AWS Accounts
1111
organization_root_id = "r-xxxx"
12+
13+
# AWS regions to monitor using Jit
14+
regions_to_monitor = ["us-east-1", "us-west-2"]
15+
16+
# AWS region to deploy the integration to
17+
aws_region = "us-east-1"
18+
19+
# Prefix for the resource name
20+
resource_name_prefix = "JitOrg"

src/integrations/aws_integration_automation/examples/aws_organization/variables.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ variable "should_include_root_account" {
2727
variable "regions_to_monitor" {
2828
description = "AWS regions to monitor using Jit"
2929
type = list(string)
30-
default = ["us-east-1", "us-west-2"]
3130
}
3231

3332
variable "aws_region" {
3433
description = "AWS region to deploy the integration to"
3534
type = string
36-
default = "us-east-1"
35+
}
36+
37+
variable "resource_name_prefix" {
38+
description = "Prefix for the resource name"
39+
type = string
40+
default = "JitOrg"
3741
}

src/integrations/aws_integration_automation/examples/single_account/terraform.tfvars

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,15 @@
33
# Create creds using "Engineering Manager" role
44
jit_client_id = "JIT_API_KEY_CLIENT_ID"
55
jit_secret = "JIT_API_KEY_SECRET"
6+
7+
# AWS regions to monitor using Jit
8+
regions_to_monitor = ["us-east-1", "us-west-2"]
9+
10+
# AWS region to deploy the integration to
11+
aws_region = "us-east-1"
12+
13+
# Prefix for the resource name
14+
resource_name_prefix = "JitProd"
15+
16+
# Name of the account to monitor
17+
account_name = "My AWS Account"

src/integrations/aws_integration_automation/examples/single_account/variables.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,16 @@ variable "jit_secret" {
1515
variable "regions_to_monitor" {
1616
description = "AWS regions to monitor using Jit"
1717
type = list(string)
18-
default = ["us-east-1", "us-west-2"]
1918
}
2019

2120
variable "aws_region" {
2221
description = "AWS region to deploy the integration to"
2322
type = string
24-
default = "us-east-1"
2523
}
2624

2725
variable "account_name" {
2826
description = "Name of the account to monitor"
2927
type = string
30-
default = "Production Account"
3128
}
3229

3330
variable "resource_name_prefix" {

0 commit comments

Comments
 (0)