diff --git a/README.md b/README.md index e305986fb9a..1ed53e40ac8 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ In order to deploy both the stacks the user needs to provide a set of required a | additionalConfig | Optional | string | Additional opensearch.yml config parameters passed as JSON. e.g., `--context additionalConfig='{"plugins.security.nodes_dn": ["CN=*.example.com, OU=SSL, O=Test, L=Test, C=DE", "CN=node.other.com, OU=SSL, O=Test, L=Test, C=DE"], "plugins.security.nodes_dn_dynamic_config_enabled": false}'` | | additionalOsdConfig | Optional | string | Additional opensearch_dashboards.yml config parameters passed as JSON. e.g., `additionalOsdConfig='{"data.search.usageTelemetry.enabled": "true"}'` | | suffix | Optional | string | An optional string identifier to be concatenated with infra stack name. | +| networkStackSuffix (Optional) | string | An optional string identifier to be concatenated with network stack name. | | region | Optional | string | User provided aws region | | account | Optional | string | User provided aws account | | dataNodeStorage | Optional | string | User provided ebs block storage size. Defaults to 100Gb | diff --git a/lib/os-cluster-entrypoint.ts b/lib/os-cluster-entrypoint.ts index 071422f3305..5ddea5d6ee9 100644 --- a/lib/os-cluster-entrypoint.ts +++ b/lib/os-cluster-entrypoint.ts @@ -203,6 +203,7 @@ export class OsClusterEntrypoint { } const suffix = `${scope.node.tryGetContext('suffix')}`; + const networkStackSuffix = `${scope.node.tryGetContext('networkStackSuffix')}`; const use50heap = `${scope.node.tryGetContext('use50PercentHeap')}`; const use50PercentHeap = use50heap === 'true'; @@ -215,7 +216,12 @@ export class OsClusterEntrypoint { const customRoleArn = `${scope.node.tryGetContext('customRoleArn')}`; - const network = new NetworkStack(scope, 'opensearch-network-stack', { + let networkStackName = 'opensearch-network-stack'; + if (networkStackSuffix !== 'undefined') { + networkStackName = `opensearch-network-stack-${networkStackSuffix}`; + } + + const network = new NetworkStack(scope, networkStackName, { cidrBlock: cidrRange, maxAzs: 3, vpcId,