Skip to content

Commit 056fe13

Browse files
add cte agents to cm sg (#488)
1 parent f0fb0e9 commit 056fe13

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

examples/aws/poc/dsf_deployment/cm.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module "ciphertrust_manager" {
2323
allowed_web_console_and_api_cidrs = var.web_console_cidr
2424
allowed_ssh_cidrs = concat(local.workstation_cidr, var.allowed_ssh_cidrs)
2525
allowed_cluster_nodes_cidrs = [data.aws_subnet.ciphertrust_manager.cidr_block]
26+
allowed_cte_agents_cidrs = [data.aws_subnet.cte_ddc_agent.cidr_block]
2627
allowed_ddc_agents_cidrs = [data.aws_subnet.cte_ddc_agent.cidr_block]
2728
allowed_all_cidrs = local.workstation_cidr
2829
tags = local.tags

modules/aws/ciphertrust-manager/sg.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ locals {
2424
tcp = [5432]
2525
cidrs = concat(var.allowed_cluster_nodes_cidrs, var.allowed_all_cidrs)
2626
},
27+
{
28+
name = ["cte", "agents"]
29+
internet_access = false
30+
udp = []
31+
tcp = [443]
32+
cidrs = concat(var.allowed_cte_agents_cidrs, var.allowed_all_cidrs)
33+
},
2734
{
2835
name = ["ddc", "agents"]
2936
internet_access = false

modules/aws/ciphertrust-manager/variables.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ variable "allowed_cluster_nodes_cidrs" {
6767
default = []
6868
}
6969

70+
variable "allowed_cte_agents_cidrs" {
71+
type = list(string)
72+
description = "List of ingress CIDR patterns allowing CTE agents to access the CipherTrust Manager instance"
73+
validation {
74+
condition = alltrue([for item in var.allowed_cte_agents_cidrs : can(cidrnetmask(item))])
75+
error_message = "Each item of this list must be in a valid CIDR block format. For example: [\"10.106.108.0/25\"]"
76+
}
77+
default = []
78+
}
79+
7080
variable "allowed_ddc_agents_cidrs" {
7181
type = list(string)
7282
description = "List of ingress CIDR patterns allowing DDC agents to access the CipherTrust Manager instance"

0 commit comments

Comments
 (0)