Skip to content

Commit

Permalink
docs: examples/build/terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
jshlbrd committed Dec 4, 2023
1 parent a57be27 commit d6c12dc
Show file tree
Hide file tree
Showing 35 changed files with 56 additions and 72 deletions.

This file was deleted.

2 changes: 1 addition & 1 deletion examples/build/terraform/aws/dynamodb/cdc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ then
fi

export AWS_DEFAULT_REGION=$AWS_REGION
BUILD_DIR=$SUBSTATION_ROOT/examples/aws/lambda/dynamodb/cdc
BUILD_DIR=$SUBSTATION_ROOT/examples/build/terraform/aws/dynamodb/cdc

echo "> Deploying infrastructure in AWS with Terraform" && \
cd $BUILD_DIR/terraform && \
Expand Down
2 changes: 1 addition & 1 deletion examples/build/terraform/aws/dynamodb/cdc/destroy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export AWS_DEFAULT_REGION=$AWS_REGION
BUILD_DIR=$SUBSTATION_ROOT/examples/aws/lambda/dynamodb/cdc
BUILD_DIR=$SUBSTATION_ROOT/examples/build/terraform/aws/dynamodb/cdc

echo "> Removing Substation configurations from AWS AppConfig" && \
cd $SUBSTATION_ROOT && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data "aws_caller_identity" "caller" {}

# KMS encryption key that is shared by all Substation infrastructure
module "kms" {
source = "../../../../../../build/terraform/aws/kms"
source = "../../../../../../../build/terraform/aws/kms"

config = {
name = "alias/substation"
Expand Down Expand Up @@ -60,7 +60,7 @@ resource "aws_appconfig_deployment_strategy" "instant" {

# Repository for the core Substation application.
module "ecr_substation" {
source = "../../../../../../build/terraform/aws/ecr"
source = "../../../../../../../build/terraform/aws/ecr"
kms = module.kms

config = {
Expand All @@ -70,7 +70,7 @@ module "ecr_substation" {
}

module "dynamodb" {
source = "../../../../../../build/terraform/aws/dynamodb"
source = "../../../../../../../build/terraform/aws/dynamodb"
kms = module.kms

config = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "node" {
source = "../../../../../../build/terraform/aws/lambda"
source = "../../../../../../../build/terraform/aws/lambda"
# These are always required for all Lambda.
kms = module.kms
appconfig = aws_appconfig_application.substation
Expand Down
2 changes: 1 addition & 1 deletion examples/build/terraform/aws/kinesis/firehose/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ then
fi

export AWS_DEFAULT_REGION=$AWS_REGION
BUILD_DIR=$SUBSTATION_ROOT/examples/aws/lambda/kinesis/firehose
BUILD_DIR=$SUBSTATION_ROOT/examples/build/terraform/aws/kinesis/firehose

echo "> Deploying infrastructure in AWS with Terraform" && \
cd $BUILD_DIR/terraform && \
Expand Down
2 changes: 1 addition & 1 deletion examples/build/terraform/aws/kinesis/firehose/destroy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export AWS_DEFAULT_REGION=$AWS_REGION
BUILD_DIR=$SUBSTATION_ROOT/examples/aws/lambda/kinesis/firehose
BUILD_DIR=$SUBSTATION_ROOT/examples/build/terraform/aws/kinesis/firehose

echo "> Removing Substation configurations from AWS AppConfig" && \
cd $SUBSTATION_ROOT && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data "aws_caller_identity" "caller" {}

# KMS encryption key that is shared by all Substation infrastructure
module "kms" {
source = "../../../../../../build/terraform/aws/kms"
source = "../../../../../../../build/terraform/aws/kms"

config = {
name = "alias/substation"
Expand Down Expand Up @@ -64,7 +64,7 @@ resource "aws_appconfig_deployment_strategy" "instant" {

# Repository for the core Substation application.
module "ecr_substation" {
source = "../../../../../../build/terraform/aws/ecr"
source = "../../../../../../../build/terraform/aws/ecr"
kms = module.kms

config = {
Expand Down Expand Up @@ -205,7 +205,7 @@ resource "aws_kinesis_firehose_delivery_stream" "firehose" {
}

module "processor" {
source = "../../../../../../build/terraform/aws/lambda"
source = "../../../../../../../build/terraform/aws/lambda"
# These are always required for all Lambda.
kms = module.kms
appconfig = aws_appconfig_application.substation
Expand Down
2 changes: 1 addition & 1 deletion examples/build/terraform/aws/kinesis/multistream/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ then
fi

export AWS_DEFAULT_REGION=$AWS_REGION
BUILD_DIR=$SUBSTATION_ROOT/examples/aws/lambda/kinesis/multistream
BUILD_DIR=$SUBSTATION_ROOT/examples/build/terraform/aws/kinesis/multistream

echo "> Deploying infrastructure in AWS with Terraform" && \
cd $BUILD_DIR/terraform && \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export AWS_DEFAULT_REGION=$AWS_REGION
BUILD_DIR=$SUBSTATION_ROOT/examples/aws/lambda/kinesis/multistream
BUILD_DIR=$SUBSTATION_ROOT/examples/build/terraform/aws/kinesis/multistream

echo "> Removing Substation configurations from AWS AppConfig" && \
cd $SUBSTATION_ROOT && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data "aws_caller_identity" "caller" {}

# KMS encryption key that is shared by all Substation infrastructure
module "kms" {
source = "../../../../../../build/terraform/aws/kms"
source = "../../../../../../../build/terraform/aws/kms"

config = {
name = "alias/substation"
Expand Down Expand Up @@ -60,7 +60,7 @@ resource "aws_appconfig_deployment_strategy" "instant" {

# Repository for the core Substation application.
module "ecr_substation" {
source = "../../../../../../build/terraform/aws/ecr"
source = "../../../../../../../build/terraform/aws/ecr"
kms = module.kms

config = {
Expand All @@ -71,7 +71,7 @@ module "ecr_substation" {

# Repository for the autoscaling application.
module "ecr_autoscaling" {
source = "../../../../../../build/terraform/aws/ecr"
source = "../../../../../../../build/terraform/aws/ecr"
kms = module.kms

config = {
Expand All @@ -88,7 +88,7 @@ resource "aws_sns_topic" "autoscaling_topic" {

# API Gateway that sends data to Kinesis.
module "gateway_to_kinesis" {
source = "../../../../../../build/terraform/aws/api_gateway/kinesis_data_stream"
source = "../../../../../../../build/terraform/aws/lambdaapi_gateway/kinesis_data_stream"
# Always required for the Kinisis Data Stream integration.
kinesis_data_stream = module.kds_src

Expand All @@ -99,7 +99,7 @@ module "gateway_to_kinesis" {

# Kinesis Data Stream that stores data sent from pipeline sources.
module "kds_src" {
source = "../../../../../../build/terraform/aws/kinesis_data_stream"
source = "../../../../../../../build/terraform/aws/kinesis_data_stream"
kms = module.kms

config = {
Expand All @@ -119,7 +119,7 @@ module "kds_src" {

# Kinesis Data Stream that stores data sent from the pipeline processor.
module "kds_dst" {
source = "../../../../../../build/terraform/aws/kinesis_data_stream"
source = "../../../../../../../build/terraform/aws/kinesis_data_stream"
kms = module.kms

config = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Used for deploying and maintaining the Kinesis Data Streams autoscaling application; does not need to be used if deployments don't include Kinesis Data Streams.

module "lambda_autoscaling" {
source = "../../../../../../build/terraform/aws/lambda"
source = "../../../../../../../build/terraform/aws/lambda"
# These are always required for all Lambda.
kms = module.kms
appconfig = aws_appconfig_application.substation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "lambda_publisher" {
source = "../../../../../../build/terraform/aws/lambda"
source = "../../../../../../../build/terraform/aws/lambda"
# These are always required for all Lambda.
kms = module.kms
appconfig = aws_appconfig_application.substation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "lambda_subscriber" {
source = "../../../../../../build/terraform/aws/lambda"
source = "../../../../../../../build/terraform/aws/lambda"
# These are always required for all Lambda.
kms = module.kms
appconfig = aws_appconfig_application.substation
Expand Down
2 changes: 1 addition & 1 deletion examples/build/terraform/aws/lambda/microservice/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ then
fi

export AWS_DEFAULT_REGION=$AWS_REGION
BUILD_DIR=$SUBSTATION_ROOT/examples/aws/lambda/lambda/microservice
BUILD_DIR=$SUBSTATION_ROOT/examples/build/terraform/aws/lambda/microservice

echo "> Deploying infrastructure in AWS with Terraform" && \
cd $BUILD_DIR/terraform && \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export AWS_DEFAULT_REGION=$AWS_REGION
BUILD_DIR=$SUBSTATION_ROOT/examples/aws/lambda/lambda/microservice
BUILD_DIR=$SUBSTATION_ROOT/examples/build/terraform/aws/lambda/microservice

echo "> Removing Substation configurations from AWS AppConfig" && \
cd $SUBSTATION_ROOT && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data "aws_caller_identity" "caller" {}

# KMS encryption key that is shared by all Substation resources.
module "kms" {
source = "../../../../../../build/terraform/aws/kms"
source = "../../../../../../../build/terraform/aws/kms"
config = {
name = "alias/substation"
policy = <<POLICY
Expand Down Expand Up @@ -59,7 +59,7 @@ resource "aws_appconfig_deployment_strategy" "instant" {

# Repository for the core Substation application.
module "ecr_substation" {
source = "../../../../../../build/terraform/aws/ecr"
source = "../../../../../../../build/terraform/aws/ecr"
kms = module.kms

config = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "microservice" {
source = "../../../../../../build/terraform/aws/lambda"
source = "../../../../../../../build/terraform/aws/lambda"
# These are always required for all Lambda.
kms = module.kms
appconfig = aws_appconfig_application.substation
Expand Down
2 changes: 1 addition & 1 deletion examples/build/terraform/aws/lambda/vpc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ then
fi

export AWS_DEFAULT_REGION=$AWS_REGION
BUILD_DIR=$SUBSTATION_ROOT/examples/aws/lambda/lambda/vpc
BUILD_DIR=$SUBSTATION_ROOT/examples/build/terraform/aws/lambda/vpc

echo "> Deploying infrastructure in AWS with Terraform" && \
cd $BUILD_DIR/terraform && \
Expand Down
2 changes: 1 addition & 1 deletion examples/build/terraform/aws/lambda/vpc/destroy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export AWS_DEFAULT_REGION=$AWS_REGION
BUILD_DIR=$SUBSTATION_ROOT/examples/aws/lambda/lambda/vpc
BUILD_DIR=$SUBSTATION_ROOT/examples/build/terraform/aws/lambda/vpc

echo "> Removing Substation configurations from AWS AppConfig" && \
cd $SUBSTATION_ROOT && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data "aws_caller_identity" "caller" {}

# KMS encryption key that is shared by all Substation resources.
module "kms" {
source = "../../../../../../build/terraform/aws/kms"
source = "../../../../../../../build/terraform/aws/kms"
config = {
name = "alias/substation"
policy = <<POLICY
Expand Down Expand Up @@ -59,7 +59,7 @@ resource "aws_appconfig_deployment_strategy" "instant" {

# Repository for the core Substation application.
module "ecr_substation" {
source = "../../../../../../build/terraform/aws/ecr"
source = "../../../../../../../build/terraform/aws/ecr"
kms = module.kms

config = {
Expand All @@ -73,5 +73,5 @@ module "ecr_substation" {
# By default, this creates a /16 VPC with private subnets
# in three availability zones in us-east-1.
module "vpc_substation" {
source = "../../../../../../build/terraform/aws/networking/vpc"
source = "../../../../../../../build/terraform/aws/networking/vpc"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "whatismyip" {
source = "../../../../../../build/terraform/aws/lambda"
source = "../../../../../../../build/terraform/aws/lambda"
# These are always required for all Lambda.
kms = module.kms
appconfig = aws_appconfig_application.substation
Expand Down
2 changes: 1 addition & 1 deletion examples/build/terraform/aws/s3/data_lake/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ then
fi

export AWS_DEFAULT_REGION=$AWS_REGION
BUILD_DIR=$SUBSTATION_ROOT/examples/aws/lambda/s3/data_lake
BUILD_DIR=$SUBSTATION_ROOT/examples/build/terraform/aws/s3/data_lake

echo "> Deploying infrastructure in AWS with Terraform" && \
cd $BUILD_DIR/terraform && \
Expand Down
2 changes: 1 addition & 1 deletion examples/build/terraform/aws/s3/data_lake/destroy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export AWS_DEFAULT_REGION=$AWS_REGION
BUILD_DIR=$SUBSTATION_ROOT/examples/aws/lambda/s3/data_lake
BUILD_DIR=$SUBSTATION_ROOT/examples/build/terraform/aws/s3/data_lake

echo "> Removing Substation configurations from AWS AppConfig" && \
cd $SUBSTATION_ROOT && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data "aws_caller_identity" "caller" {}

# KMS encryption key that is shared by all Substation infrastructure
module "kms" {
source = "../../../../../../build/terraform/aws/kms"
source = "../../../../../../../build/terraform/aws/kms"

config = {
name = "alias/substation"
Expand Down Expand Up @@ -60,7 +60,7 @@ resource "aws_appconfig_deployment_strategy" "instant" {

# Repository for the core Substation application.
module "ecr_substation" {
source = "../../../../../../build/terraform/aws/ecr"
source = "../../../../../../../build/terraform/aws/ecr"
kms = module.kms

config = {
Expand All @@ -73,7 +73,7 @@ resource "random_uuid" "s3" {}

# Monolithic S3 bucket used to store all data.
module "s3" {
source = "../../../../../../build/terraform/aws/s3"
source = "../../../../../../../build/terraform/aws/s3"
kms = module.kms

config = {
Expand Down
4 changes: 2 additions & 2 deletions examples/build/terraform/aws/s3/data_lake/terraform/node.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "lambda_gateway" {
source = "../../../../../../build/terraform/aws/api_gateway/lambda"
source = "../../../../../../../build/terraform/aws/api_gateway/lambda"
lambda = module.lambda_node

config = {
Expand All @@ -12,7 +12,7 @@ module "lambda_gateway" {
}

module "lambda_node" {
source = "../../../../../../build/terraform/aws/lambda"
source = "../../../../../../../build/terraform/aws/lambda"
# These are always required for all Lambda.
kms = module.kms
appconfig = aws_appconfig_application.substation
Expand Down
2 changes: 1 addition & 1 deletion examples/build/terraform/aws/sns/pub_sub/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ then
fi

export AWS_DEFAULT_REGION=$AWS_REGION
BUILD_DIR=$SUBSTATION_ROOT/examples/aws/lambda/sns/pub_sub
BUILD_DIR=$SUBSTATION_ROOT/examples/build/terraform/aws/sns/pub_sub

echo "> Deploying infrastructure in AWS with Terraform" && \
cd $BUILD_DIR/terraform && \
Expand Down
2 changes: 1 addition & 1 deletion examples/build/terraform/aws/sns/pub_sub/destroy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export AWS_DEFAULT_REGION=$AWS_REGION
BUILD_DIR=$SUBSTATION_ROOT/examples/aws/lambda/sns/pub_sub
BUILD_DIR=$SUBSTATION_ROOT/examples/build/terraform/aws/sns/pub_sub

echo "> Removing Substation configurations from AWS AppConfig" && \
cd $SUBSTATION_ROOT && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data "aws_caller_identity" "caller" {}

# KMS encryption key that is shared by all Substation infrastructure
module "kms" {
source = "../../../../../../build/terraform/aws/kms"
source = "../../../../../../../build/terraform/aws/kms"

config = {
name = "alias/substation"
Expand Down Expand Up @@ -60,7 +60,7 @@ resource "aws_appconfig_deployment_strategy" "instant" {

# Repository for the core Substation application.
module "ecr_substation" {
source = "../../../../../../build/terraform/aws/ecr"
source = "../../../../../../../build/terraform/aws/ecr"
kms = module.kms

config = {
Expand All @@ -70,7 +70,7 @@ module "ecr_substation" {
}

module "sns" {
source = "../../../../../../build/terraform/aws/sns"
source = "../../../../../../../build/terraform/aws/sns"
kms = module.kms

config = {
Expand Down
Loading

0 comments on commit d6c12dc

Please sign in to comment.