Skip to content

Boilerplate Terraform Module for creating resources for typical micro services.

License

Notifications You must be signed in to change notification settings

Flaconi/terraform-aws-microservice

Repository files navigation

Microservice Boilerplate

lint test Tag License

This Terraform module can create typical resources needed for most microservices.

Examples

Usage

DynamoDB Microservice

module "microservice" {
  source = "github.com/flaconi/terraform-aws-microservice"

  env  = "playground"
  name = "sample"

  # iam_user_enabled creates an user with keys, with `iam_role_enabled` the user can switch into the role created by `iam_role_enabled`
  # For this example we're only creating a role with access to Dynamodb
  iam_user_enabled = false

  # iam_role_enabled creates a role.
  iam_role_enabled = true

  # Sample principal which can assume into this role
  #iam_role_principals_arns = ["arn:aws:iam::12374567890:root"]

  iam_inline_policies = [
   {
     name = "s3-access"
     statements = [
       {
         actions   = ["s3:ListBucket"]
         resources = ["arn:aws:s3:::test"]
       },
       {
         actions   = ["s3:get*"]
         resources = ["arn:aws:s3:::test/*"]
       }
     ]
   },
   {
     name = "kinesis-full-access"
     statements = [
       {
         actions   = ["kinesis:*"]
         resources = ["*"]
       },
     ]
   }
  ]


  # -------------------------------------------------------------------------------------------------
  # DynamoDB
  # This module re-uses an implementation of the module https://github.com/cloudposse/terraform-aws-dynamodb
  # -------------------------------------------------------------------------------------------------
  # `dynamodb_enabled` is set to true to enable Dynamodb
  dynamodb_enabled = true
  dynamodb_hash_key  = "HashKey"
  dynamodb_range_key = "RangeKey"

  # dynamodb_attributes = []
  # dynamodb_global_secondary_index_map = []
  # dynamodb_local_secondary_index_map = []

  tags = {
    Name = "sample"
  }
}

Redis

module "ms_sample_redis" {
  source = "github.com/flaconi/terraform-aws-microservice"

  env  = "playground"
  name = "sample"

  vpc_tag_filter = {
    "Name"= "dev-vpc",
    "env"= "dev"
  }

  # redis_enabled - Set to false to prevent the module from creating any redis resources
  redis_enabled = true

  # redis_cluster_id_override - Use only lowercase, numbers and -, _., only use when it needs to be different from `var.name`
  # redis_cluster_id_override = ""

  # redis_subnet_tag_filter sets the datasource to match the subnet_id's where the RDS will be located
  redis_subnet_tag_filter = {
    "Name" = "dev-redis-subnet*"
    "env"  = "dev"
  }
  # redis_allowed_subnet_cidrs - List of CIDRs/subnets which should be able to connect to the Redis cluster
  redis_allowed_subnet_cidrs = ["127.0.0.1/32"]

  # redis_shards_count - Number of shards
  redis_shards_count = 1

  # Number of replica nodes in each node group
  redis_replicas_count = 1

  # redis_port - Redis Port
  # redis_port = 6379

  # redis_instance_type - Redis instance type
  redis_instance_type = "cache.t2.micro"

  # redis_group_engine_version - Redis engine version to be used
  # redis_group_engine_version = "5.0.0"

  # redis_group_parameter_group_name - Redis parameter group name"
  # redis_group_parameter_group_name = "default.redis5.0.cluster.on"

  # redis_snapshot_window - Redis snapshot window
  # redis_snapshot_window = "00:00-05:00"

  # redis_maintenance_window - Redis maintenance window
  # redis_maintenance_window = "mon:10:00-mon:12:00"

  tags = {
    Name = "sample"
  }

RDS

module "ms_sample_rds" {
  source = "github.com/flaconi/terraform-aws-microservice"

  env  = "playground"
  name = "sample"

  vpc_tag_filter = {
    "Name"= "dev-vpc",
    "env"= "dev"
  }

  # rds_subnet_tag_filter sets the datasource to match the subnet_id's where the RDS will be located
  rds_subnet_tag_filter = {
    "Name" = "dev-rds-subnet*"
    "env"  = "dev"
  }

  # rds_enabled enables RDS
  rds_enabled = true

  # rds_allowed_subnet_cidrs specifices the allowed subnets
  #rds_allowed_subnet_cidrs = ["127.0.0.1/32"]

  # rds_admin_user sets the admin user, defaults to admin
  # rds_admin_user          = "demouser"
  # rds_identifier_override overrides the name of the RDS instance, instead of `var.name`
  # rds_identifier_override = "overridename"

  # rds_engine sets the RDS instance engine
  # rds_engine = "mysql"

  # rds_major_engine_version RDS instance major engine version
  # rds_major_engine_version = 5.7

  # rds_family Parameter Group"
  # rds_family = "mysql5.7"

  # rds_node_type sets VM type which should be taken for nodes in the RDS instance
  # rds_node_type = "db.t3.micro"

  # rds_multi_az sets multi-az
  # rds_multi_az = true

  # rds_storage_type sets the RDS storage type
  # rds_storage_type = "gp2"

  # rds_allocated_storage sets the RDS storage size in Gb
  # rds_allocated_storage = "20"

  # rds_admin_pass sets the password in case `rds_admin_pass` is set to false
  # rds_admin_pass = ""

  # rds_use_random_password switched on sets a random password for the rds instance
  # rds_use_random_password = true

  # rds_parameter_group_name Parameter group for database
  # rds_parameter_group_name = ""

  # rds_option_group_name option groups for database
  # rds_option_group_name = ""

  # rds_port TCP port where DB accept connections
  # rds_port = "3306"

  # rds_db_subnet_group_name Subnet groups for RDS instance
  # rds_db_subnet_group_name = ""

  # rds_backup_retention_period Retention period for DB snapshots in days
  rds_backup_retention_period = 14
  # rds_deletion_protection Protect RDS instance from deletion
  rds_deletion_protection = false
  # rds_skip_final_snapshot Protect RDS instance from deletion
  rds_skip_final_snapshot = true
  # rds_storage_encrypted - enable encryption for RDS instance storage"
  rds_storage_encrypted = true
  # rds_kms_key_id - KMS key ARN for storage encryption, defaults to "" = RDS/KMS
  rds_kms_key_id = ""
  # rds_maintenance_window - Window of RDS Maintenance
  rds_maintenance_window = "Mon:16:00-Mon:18:00"
  # rds_backup_window - Backup Window
  rds_backup_window = "03:00-06:00"

  tags = {
    Name = "sample"
  }
}

Resources

The following resources CAN be created:

  • 1 IAM Role
  • 1 IAM User
  • 1 DynamoDB
  • 1 RDS Instance
  • 1 Policy for accessing Dynamodb from the IAM Role
  • 1 Redis cluster with required networking components

Providers

Name Version
aws ~> 5.40
null ~> 3.2
random ~> 3.6

Requirements

Name Version
terraform >= 1.3
aws ~> 5.40
null ~> 3.2
random ~> 3.6

Required Inputs

The following input variables are required:

Description: The environment name to which this project will be applied against (e.g.: common, dev, prod, testing)

Type: string

Description: The name of the microservice, the dependent resources will be created with this name interpolated

Type: string

Description: tags to propagate to the resources

Type: map(any)

Optional Inputs

The following input variables are optional (have default values):

Description: On delete, copy all Instance tags to the final snapshot (if final_snapshot_identifier is specified)

Type: bool

Default: true

Description: The map of tags to match the VPC tags with where the RDS or Redis or other networked AWS component of the Microservice resides

Type: map(string)

Default: {}

Description: Name(s) of the additional VPC Security Group(s) to be attached to the RDS instance.

Type: list(string)

Default: []

Description: Set to false to prevent iam role creation

Type: bool

Default: false

Description: List of ARNs to allow assuming the iam role. Could be AWS services or accounts, Kops nodes, IAM users or groups

Type: list(string)

Default: []

Description: Set to false to prevent iam user creation

Type: bool

Default: false

Description: Set the path for the iam user

Type: string

Default: "/"

Description: Policies applied to the assuming role

Type:

list(object({
    name = string
    statements = list(object({
      actions   = list(string)
      resources = list(string)
    }))
  }))

Default: []

Description: Time to live for DNS record used by the endpoints

Type: string

Default: "60"

Description: To enable the lookup of the domain used for RDS/Redis private endpoint

Type: bool

Default: false

Description: To enable the lookup of the domain used for RDS/Redis public endpoint, we need to set this to true

Type: bool

Default: true

Description: To enable the lookup of the domain used for RDS/Redis private endpoint, we need to set this to true

Type: bool

Default: true

Description: The domain / route53 zone we need to add a record with

Type: string

Default: ""

Description: To set a custom RDS DNS record subdomain instead of the RDS instance ID

Type: string

Default: ""

Description: Set to false to prevent the module from creating any dynamodb resources

Type: bool

Default: false

Description: DynamoDB Billing mode. Can be PROVISIONED or PAY_PER_REQUEST

Type: string

Default: "PROVISIONED"

Description: Storage class of the table

Type: string

Default: "STANDARD"

Description: define dynamodb_name_override to set a name differnt from var.name

Type: string

Default: ""

Description: DynamoDB table Hash Key

Type: string

Default: ""

Description: Hash Key type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data

Type: string

Default: "S"

Description: DynamoDB table Range Key

Type: string

Default: ""

Description: Range Key type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data

Type: string

Default: "S"

Description: Additional DynamoDB attributes in the form of a list of mapped values

Type:

list(object({
    name = string
    type = string
  }))

Default: []

Description: Additional global secondary indexes in the form of a list of mapped values

Type:

list(object({
    hash_key           = string
    name               = string
    non_key_attributes = list(string)
    projection_type    = string
    range_key          = string
    read_capacity      = number
    write_capacity     = number
  }))

Default: []

Description: Additional local secondary indexes in the form of a list of mapped values

Type:

list(object({
    name               = string
    non_key_attributes = list(string)
    projection_type    = string
    range_key          = string
  }))

Default: []

Description: The target value for DynamoDB write autoscaling

Type: number

Default: 50

Description: The target value for DynamoDB read autoscaling

Type: number

Default: 50

Description: DynamoDB autoscaling min read capacity

Type: number

Default: 5

Description: DynamoDB autoscaling max read capacity

Type: number

Default: 20

Description: DynamoDB autoscaling min write capacity

Type: number

Default: 5

Description: DynamoDB autoscaling max write capacity

Type: number

Default: 20

Description: Flag to enable/disable DynamoDB autoscaling

Type: bool

Default: true

Description: Set to false to prevent the module from creating any dynamodb resources

Type: bool

Default: false

Description: DynamoDB Billing mode. Can be PROVISIONED or PAY_PER_REQUEST

Type: string

Default: "PROVISIONED"

Description: Storage class of the table

Type: string

Default: "STANDARD"

Description: define dynamodb2_name_override to set a name differnt from var.name

Type: string

Default: ""

Description: DynamoDB table Hash Key

Type: string

Default: ""

Description: Hash Key type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data

Type: string

Default: "S"

Description: DynamoDB table Range Key

Type: string

Default: ""

Description: Range Key type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data

Type: string

Default: "S"

Description: Additional DynamoDB attributes in the form of a list of mapped values

Type:

list(object({
    name = string
    type = string
  }))

Default: []

Description: Additional global secondary indexes in the form of a list of mapped values

Type:

list(object({
    hash_key           = string
    name               = string
    non_key_attributes = list(string)
    projection_type    = string
    range_key          = string
    read_capacity      = number
    write_capacity     = number
  }))

Default: []

Description: Additional local secondary indexes in the form of a list of mapped values

Type:

list(object({
    name               = string
    non_key_attributes = list(string)
    projection_type    = string
    range_key          = string
  }))

Default: []

Description: The target value for DynamoDB write autoscaling

Type: number

Default: 50

Description: The target value for DynamoDB read autoscaling

Type: number

Default: 50

Description: DynamoDB autoscaling min read capacity

Type: number

Default: 5

Description: DynamoDB autoscaling max read capacity

Type: number

Default: 20

Description: DynamoDB autoscaling min write capacity

Type: number

Default: 5

Description: DynamoDB autoscaling max write capacity

Type: number

Default: 20

Description: Flag to enable/disable DynamoDB autoscaling

Type: bool

Default: true

Description: Set to false to prevent the module from creating any dynamodb resources

Type: bool

Default: false

Description: DynamoDB Billing mode. Can be PROVISIONED or PAY_PER_REQUEST

Type: string

Default: "PROVISIONED"

Description: Storage class of the table

Type: string

Default: "STANDARD"

Description: define dynamodb3_name_override to set a name differnt from var.name

Type: string

Default: ""

Description: DynamoDB table Hash Key

Type: string

Default: ""

Description: Hash Key type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data

Type: string

Default: "S"

Description: DynamoDB table Range Key

Type: string

Default: ""

Description: Range Key type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data

Type: string

Default: "S"

Description: Additional DynamoDB attributes in the form of a list of mapped values

Type:

list(object({
    name = string
    type = string
  }))

Default: []

Description: Additional global secondary indexes in the form of a list of mapped values

Type:

list(object({
    hash_key           = string
    name               = string
    non_key_attributes = list(string)
    projection_type    = string
    range_key          = string
    read_capacity      = number
    write_capacity     = number
  }))

Default: []

Description: Additional local secondary indexes in the form of a list of mapped values

Type:

list(object({
    name               = string
    non_key_attributes = list(string)
    projection_type    = string
    range_key          = string
  }))

Default: []

Description: The target value for DynamoDB write autoscaling

Type: number

Default: 50

Description: The target value for DynamoDB read autoscaling

Type: number

Default: 50

Description: DynamoDB autoscaling min read capacity

Type: number

Default: 5

Description: DynamoDB autoscaling max read capacity

Type: number

Default: 20

Description: DynamoDB autoscaling min write capacity

Type: number

Default: 5

Description: DynamoDB autoscaling max write capacity

Type: number

Default: 20

Description: Flag to enable/disable DynamoDB autoscaling

Type: bool

Default: true

Description: Set to false to prevent the module from creating any dynamodb resources

Type: bool

Default: false

Description: DynamoDB Billing mode. Can be PROVISIONED or PAY_PER_REQUEST

Type: string

Default: "PROVISIONED"

Description: Storage class of the table

Type: string

Default: "STANDARD"

Description: define dynamodb4_name_override to set a name differnt from var.name

Type: string

Default: ""

Description: DynamoDB table Hash Key

Type: string

Default: ""

Description: Hash Key type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data

Type: string

Default: "S"

Description: DynamoDB table Range Key

Type: string

Default: ""

Description: Range Key type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data

Type: string

Default: "S"

Description: Additional DynamoDB attributes in the form of a list of mapped values

Type:

list(object({
    name = string
    type = string
  }))

Default: []

Description: Additional global secondary indexes in the form of a list of mapped values

Type:

list(object({
    hash_key           = string
    name               = string
    non_key_attributes = list(string)
    projection_type    = string
    range_key          = string
    read_capacity      = number
    write_capacity     = number
  }))

Default: []

Description: Additional local secondary indexes in the form of a list of mapped values

Type:

list(object({
    name               = string
    non_key_attributes = list(string)
    projection_type    = string
    range_key          = string
  }))

Default: []

Description: The target value for DynamoDB write autoscaling

Type: number

Default: 50

Description: The target value for DynamoDB read autoscaling

Type: number

Default: 50

Description: DynamoDB autoscaling min read capacity

Type: number

Default: 5

Description: DynamoDB autoscaling max read capacity

Type: number

Default: 20

Description: DynamoDB autoscaling min write capacity

Type: number

Default: 5

Description: DynamoDB autoscaling max write capacity

Type: number

Default: 20

Description: Flag to enable/disable DynamoDB autoscaling

Type: bool

Default: true

Description: Set to false to prevent the module from creating any redis resources

Type: bool

Default: false

Description: Redis cluster ID. Use only lowercase, numbers and -, _., only use when it needs to be different from var.name

Type: string

Default: ""

Description: Redis port

Type: string

Default: "6379"

Description: Redis instance type

Type: string

Default: "cache.m4.large"

Description: Number of shards

Type: number

Default: 1

Description: Redis engine version to be used

Type: string

Default: "5.0.0"

Description: Redis parameter group name

Type: string

Default: "default.redis5.0.cluster.on"

Description: Redis snapshot window

Type: string

Default: "00:00-05:00"

Description: Redis snapshot window

Type: string

Default: "mon:10:00-mon:12:00"

Description: Redis allow auto minor version upgrade

Type: bool

Default: true

Description: Redis encrypt storage

Type: bool

Default: false

Description: Redis encrypt transit TLS

Type: bool

Default: false

Description: Number of replica nodes in each node group

Type: number

Default: 1

Description: List of CIDRs/subnets which should be able to connect to the Redis cluster

Type: list(string)

Default:

[
  "127.0.0.1/32"
]

Description: The Map to filter the subnets of the VPC where the Redis component of the Microservice resides

Type: map(string)

Default: {}

Description: List of CIDR blocks to filter subnets of the VPC where the Redis component of the Microservice resides

Type: list(string)

Default: []

Description: Specifies whether any modifications are applied immediately, or during the next maintenance window.

Type: bool

Default: false

Description: Specifies whether to enable Multi-AZ Support for the replication group. If true, automatic_failover_enabled must also be enabled.

Type: bool

Default: false

Description: Specifies whether any database modifications are applied immediately, or during the next maintenance window

Type: bool

Default: false

Description: Set to false to prevent the module from creating any rds resources

Type: bool

Default: false

Description: Set to true to allow the module to create RDS DB dump resources.

Type: bool

Default: false

Description: The S3 name prefix

Type: string

Default: ""

Description: List of CIDRs allowed to access data on the S3 bucket for RDS DB dumps

Type: list(string)

Default: []

Description: List of IAM role ARNs that are able to access the KMS key used for encrypting RDS dump files in the S3 bucket

Type: list(string)

Default: []

Description: IAM role ARN to be associated with the RDS instance, for being able to access the S3 dump bucket(s). If this is set, the module will not create the role nor its policy but instead will directly associate the RDS instance with passed role. If this is not set, the module will handle the creation of the IAM policy and the role itself.

Type: string

Default: ""

Description: RDS S3 Dump Lifecycle rules

Type:

list(object({
    id     = string
    status = optional(string, "Enabled")
    prefix = string
    expiration = optional(list(object({
      days                         = optional(number)
      date                         = optional(string)
      expired_object_delete_marker = optional(bool)
    })), [])
    transition = optional(list(object({
      days          = optional(number)
      date          = optional(string)
      storage_class = string
    })), [])
    noncurrent_version_expiration = optional(list(object({
      noncurrent_days           = optional(number)
      newer_noncurrent_versions = optional(string)
    })), [])
    noncurrent_version_transition = optional(list(object({
      noncurrent_days           = optional(number)
      newer_noncurrent_versions = optional(string)
      storage_class             = string
    })), [])
  }))

Default: []

Description: RDS identifier override. Use only lowercase, numbers and -, _., only use when it needs to be different from var.name

Type: string

Default: ""

Description: RDS DB Name override in case the identifier is not wished as db name

Type: string

Default: ""

Description: List of CIDRs/subnets which should be able to connect to the RDS instance

Type: list(string)

Default:

[
  "127.0.0.1/32"
]

Description: (Optional) Updated Terraform resource management timeouts. Applies to aws_db_instance in particular to permit resource management times

Type: map(string)

Default:

{
  "create": "40m",
  "delete": "40m",
  "update": "80m"
}

Description: Define maximum timeout for deletion of aws_db_option_group resource

Type: map(string)

Default:

{
  "delete": "15m"
}

Description: RDS instance engine

Type: string

Default: "mysql"

Description: RDS instance major engine version

Type: string

Default: "5.7"

Description: Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window

Type: bool

Default: false

Description: RDS instance engine version

Type: string

Default: "5.7.19"

Description: Parameter Group

Type: string

Default: "mysql5.7"

Description: VM type which should be taken for nodes in the RDS instance

Type: string

Default: "db.t3.micro"

Description: Replication settings

Type: bool

Default: true

Description: Storage type

Type: string

Default: "gp2"

Description: Storage size in Gb

Type: string

Default: 20

Description: Specifies the value for Storage Autoscaling

Type: number

Default: 0

Description: The amount of provisioned IOPS. Setting this implies a storage_type of 'io1'

Type: number

Default: 0

Description: Admin user name, should default when empty

Type: string

Default: "admin"

Description: Admin user password. At least 8 characters.

Type: string

Default: ""

Description: with rds_use_random_password set to true the RDS database will be configured with a random password

Type: bool

Default: true

Description: Enable / disable IAM database authentication

Type: string

Default: "false"

Description: Parameter group for database

Type: string

Default: ""

Description: List of RDS parameters to apply

Type: list(map(string))

Default: []

Description: Option groups for database

Type: string

Default: ""

Description: A list of RDS Options to apply

Type: any

Default: []

Description: The identifier of the CA certificate for the DB instance.

Type: string

Default: "rds-ca-2019"

Description: License model information for this DB instance. Optional, but required for some DB engines, i.e. Oracle SE1

Type: string

Default: ""

Description: List of log types to enable for exporting to CloudWatch logs. If omitted, no logs will be exported. Valid values (depending on engine): alert, audit, error, general, listener, slowquery, trace, postgresql (PostgreSQL), upgrade (PostgreSQL).

Type: list(string)

Default: []

Description: Specifies whether Performance Insights are enabled

Type: bool

Default: false

Description: The amount of time in days to retain Performance Insights data. Either 7 (7 days) or 731 (2 years).

Type: number

Default: 7

Description: The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60.

Type: number

Default: 0

Description: Description of the DB subnet group to create

Type: string

Default: ""

Description: Description of the DB parameter group to create

Type: string

Default: ""

Description: The description of the option group

Type: string

Default: ""

Description: Determines whether to use option_group_name as is or create a unique name beginning with the option_group_name as the prefix

Type: bool

Default: true

Description: TCP port where DB accept connections

Type: string

Default: "3306"

Description: Subnet groups for RDS instance

Type: string

Default: ""

Description: The Map to filter the subnets of the VPC where the RDS component of the Microservice resides

Type: map(string)

Default: {}

Description: List of CIDR blocks to filter subnets of the VPC where the RDS component of the Microservice resides

Type: list(string)

Default: []

Description: RDS final snapshot identifier override.

Type: string

Default: ""

Description: Specifies whether or not to create this database from a snapshot.

Type: string

Default: ""

Description: Retention period for DB snapshots in days

Type: string

Default: 14

Description: Protect RDS instance from deletion

Type: bool

Default: true

Description: Skip final snapshot on deletion

Type: bool

Default: false

Description: Enable encryption for RDS instance storage

Type: bool

Default: true

Description: KMS key ARN for storage encryption

Type: string

Default: ""

Description: Window of RDS Maintenance

Type: string

Default: "Mon:16:00-Mon:18:00"

Description: Backup window

Type: string

Default: "03:00-06:00"

Description: S3 bucket creation and iam policy creation enabled

Type: bool

Default: false

Description: The S3 Bucket name

Type: string

Default: ""

Description: S3 Force destroy

Type: bool

Default: true

Description: S3 Versioning enabled

Type: string

Default: "Enabled"

Description: S3 Lifecycle rules

Type:

list(object({
    id     = string
    status = optional(string, "Enabled")
    prefix = string
    expiration = optional(list(object({
      days                         = optional(number)
      date                         = optional(string)
      expired_object_delete_marker = optional(bool)
    })), [])
    transition = optional(list(object({
      days          = optional(number)
      date          = optional(string)
      storage_class = string
    })), [])
    noncurrent_version_expiration = optional(list(object({
      noncurrent_days           = optional(number)
      newer_noncurrent_versions = optional(string)
    })), [])
    noncurrent_version_transition = optional(list(object({
      noncurrent_days           = optional(number)
      newer_noncurrent_versions = optional(string)
      storage_class             = string
    })), [])
  }))

Default: []

Description: Set to false to prevent the module from creating any sqs resources

Type: bool

Default: false

Description: define sqs1_name_override to set a name differnt from var.name

Type: string

Default: ""

Description: define sqs1_delay_seconds

Type: number

Default: 0

Description: Boolean designating a FIFO queue

Type: bool

Default: false

Description: The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days)

Type: number

Default: 262144

Description: The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds)

Type: number

Default: 0

Description: The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5")

Type: string

Default: ""

Description: The visibility timeout for the queue. An integer from 0 to 43200 (12 hours)

Type: number

Default: 30

Description: Set to false to prevent the module from creating any sqs-dql resources

Type: bool

Default: false

Description: Set to false to prevent the module from creating any sqs resources

Type: bool

Default: false

Description: define sqs2_name_override to set a name differnt from var.name

Type: string

Default: ""

Description: define sqs2_delay_seconds

Type: number

Default: 0

Description: Boolean designating a FIFO queue

Type: bool

Default: false

Description: The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days)

Type: number

Default: 262144

Description: The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds)

Type: number

Default: 0

Description: The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5")

Type: string

Default: ""

Description: The visibility timeout for the queue. An integer from 0 to 43200 (12 hours)

Type: number

Default: 30

Description: Set to false to prevent the module from creating any sqs-dql resources

Type: bool

Default: false

Description: Set to false to prevent the module from creating any sqs resources

Type: bool

Default: false

Description: define sqs3_name_override to set a name differnt from var.name

Type: string

Default: ""

Description: define sqs3_delay_seconds

Type: number

Default: 0

Description: Boolean designating a FIFO queue

Type: bool

Default: false

Description: The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days)

Type: number

Default: 262144

Description: The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds)

Type: number

Default: 0

Description: The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5")

Type: string

Default: ""

Description: The visibility timeout for the queue. An integer from 0 to 43200 (12 hours)

Type: number

Default: 30

Description: Set to false to prevent the module from creating any sqs-dql resources

Type: bool

Default: false

Description: Set to false to prevent the module from creating any sqs resources

Type: bool

Default: false

Description: define sqs4_name_override to set a name differnt from var.name

Type: string

Default: ""

Description: define sqs4_delay_seconds

Type: number

Default: 0

Description: Boolean designating a FIFO queue

Type: bool

Default: false

Description: The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days)

Type: number

Default: 262144

Description: The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds)

Type: number

Default: 0

Description: The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5")

Type: string

Default: ""

Description: The visibility timeout for the queue. An integer from 0 to 43200 (12 hours)

Type: number

Default: 30

Description: Set to false to prevent the module from creating any sqs-dql resources

Type: bool

Default: false

Description: Set to false to prevent the module from creating any sqs resources

Type: bool

Default: false

Description: define sqs5_name_override to set a name differnt from var.name

Type: string

Default: ""

Description: define sqs5_delay_seconds

Type: number

Default: 0

Description: Boolean designating a FIFO queue

Type: bool

Default: false

Description: The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days)

Type: number

Default: 262144

Description: The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds)

Type: number

Default: 0

Description: The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5")

Type: string

Default: ""

Description: The visibility timeout for the queue. An integer from 0 to 43200 (12 hours)

Type: number

Default: 30

Description: Set to false to prevent the module from creating any sqs-dql resources

Type: bool

Default: false

Outputs

Name Description
dynamodb2_global_secondary_index_names DynamoDB secondary index names
dynamodb2_local_secondary_index_names DynamoDB local index names
dynamodb2_table_arn DynamoDB table ARN
dynamodb2_table_id DynamoDB table ID
dynamodb2_table_name DynamoDB table name
dynamodb2_table_stream_arn DynamoDB table stream ARN
dynamodb2_table_stream_label DynamoDB table stream label
dynamodb3_global_secondary_index_names DynamoDB secondary index names
dynamodb3_local_secondary_index_names DynamoDB local index names
dynamodb3_table_arn DynamoDB table ARN
dynamodb3_table_id DynamoDB table ID
dynamodb3_table_name DynamoDB table name
dynamodb3_table_stream_arn DynamoDB table stream ARN
dynamodb3_table_stream_label DynamoDB table stream label
dynamodb4_global_secondary_index_names DynamoDB secondary index names
dynamodb4_local_secondary_index_names DynamoDB local index names
dynamodb4_table_arn DynamoDB table ARN
dynamodb4_table_id DynamoDB table ID
dynamodb4_table_name DynamoDB table name
dynamodb4_table_stream_arn DynamoDB table stream ARN
dynamodb4_table_stream_label DynamoDB table stream label
dynamodb_global_secondary_index_names DynamoDB secondary index names
dynamodb_local_secondary_index_names DynamoDB local index names
dynamodb_table_arn DynamoDB table ARN
dynamodb_table_id DynamoDB table ID
dynamodb_table_name DynamoDB table name
dynamodb_table_stream_arn DynamoDB table stream ARN
dynamodb_table_stream_label DynamoDB table stream label
private_rds_endpoint_aws_route53_record Private Redis cluster end-point address (should be used by the service)
private_redis_endpoint_aws_route53_record Private Redis cluster end-point address (should be used by the service)
public_rds_endpoint_aws_route53_record Public Redis cluster end-point address (should be used by the service)
public_redis_endpoint_aws_route53_record Public Redis cluster end-point address (should be used by the service)
rds_this_db_instance_address The address of the RDS instance
rds_this_db_instance_arn The ARN of the RDS instance
rds_this_db_instance_availability_zone The availability zone of the RDS instance
rds_this_db_instance_endpoint The connection endpoint
rds_this_db_instance_hosted_zone_id The canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record)
rds_this_db_instance_identifier The RDS instance Identifier
rds_this_db_instance_name The database name
rds_this_db_instance_password The database password (this password may be old, because Terraform doesn't track it after initial creation)
rds_this_db_instance_port The database port
rds_this_db_instance_resource_id The RDS Resource ID of this instance
rds_this_db_instance_status The RDS instance status
rds_this_db_instance_username The master username for the database
rds_this_db_parameter_group_arn The ARN of the db parameter group
rds_this_db_parameter_group_id The db parameter group id
rds_this_db_subnet_group_arn The ARN of the db subnet group
rds_this_db_subnet_group_id The db subnet group name
redis_port Redis port
sqs1_dlq_queue_arn SQS queue ARN
sqs1_queue_arn SQS queue ARN
sqs1_queue_id SQS queue ID
sqs1_queue_name SQS queue name
sqs2_dlq_queue_arn SQS queue ARN
sqs2_queue_arn SQS queue ARN
sqs2_queue_id SQS queue ID
sqs2_queue_name SQS queue name
sqs3_dlq_queue_arn SQS queue ARN
sqs3_queue_arn SQS queue ARN
sqs3_queue_id SQS queue ID
sqs3_queue_name SQS queue name
sqs4_dlq_queue_arn SQS queue ARN
sqs4_queue_arn SQS queue ARN
sqs4_queue_id SQS queue ID
sqs4_queue_name SQS queue name
sqs5_dlq_queue_arn SQS queue ARN
sqs5_queue_arn SQS queue ARN
sqs5_queue_id SQS queue ID
sqs5_queue_name SQS queue name
this_aws_iam_access_key IAM Access Key of the created user
this_aws_iam_access_key_secret The secret key of the user
this_aws_s3_bucket_arn id of created S3 bucket
this_aws_s3_bucket_id id of created S3 bucket
this_iam_role_arn iam role arn
this_iam_role_name iam role name
this_redis_replication_group_id The AWS Elasticache replication group ID
this_redis_replication_group_number_cache_clusters The AWS Elasticache replication group number cache clusters
this_redis_replication_group_replication_group_id The AWS Elasticache replication group replication group ID
this_redis_subnet_group_id The AWS elasticache subnet group ID
this_redis_subnet_group_name The AWS elasticache subnet group name
this_user_arn ARN of the IAM user
this_user_name IAM user name

License

MIT

Copyright (c) 2019-2022 Flaconi GmbH