rds-lambda-db-provisioner
aleks-fofanov/rds-lambda-db-provisioner/aws
Terraform module to provision database in AWS RDS instance in a VPC
AWS RDS Lambda database provisioner Introduction This module provisions an AWS lambda function which creates a new database and optionally a new user in RDS instance within a VPC. Supported engines are postgres and mysql. A newly created user or a master user (in case when you don't need a new user) will be granted all permissions to the created database. This module is aim to solve a cold-start problem - when you execute terraform apply and all your infrastructure is provisioned in one run. If are trying to solve a different problem, then you should be optimizing for Day 2 operations and provision a database by other means (e.g. using terraform postrgres provider). Features: - Master user password as well as new user password can be passed to the module either via - Module variables - Par
| Name | Type | Description | Default |
|---|---|---|---|
| logs_kms_key_id | string | KMS Key Id for Lambda function logs encryption | required |
| logs_retention_days | number | Lambda function logs retentions in days | required |
| db_instance_id | string | DB Instance Identifier | required |
| db_instance_security_group_id | string | DB instance security group to add rules to. Rules will allow communication betwe | required |
| vpc_config | object({ vpc_id | VPC configuration for Lambda function | required |
| db_master_password_ssm_param | string | Name of SSM Parameter that stores password for master user. This param takes pre | required |
| db_user_password_ssm_param_kms_key | string | Identifier of KMS key used for encryption of SSM Parameter that stores password | required |
| kms_key | string | KMS key identifier. Accepts the same format as KMS key data source (https://www. | required |
| db_name | string | Database name that should be created | required |
| db_user | string | Name of user that should be created and own (has all permission to) the provisio | required |
| db_user_password_ssm_param | string | Name of SSM Parameter that stores password for provisioned user. This param take | required |
| db_master_password_ssm_param_kms_key | string | Identifier of KMS key used for encryption of SSM Parameter that stores password | required |
| db_master_password | string | DB Instance master password. The usage of this parameter is discouraged. Conside | required |
| db_user_password | string | Password for the user that should be created and own (has all permission to) the | required |
| namespace | string | Namespace (e.g. `cp` or `cloudposse`) | "" |
| delimiter | string | Delimiter to be used between `namespace`, `name`, `stage` and `attributes` | "-" |
| stage | string | Stage (e.g. `prod`, `dev`, `staging`) | "" |
| attributes | list(string) | Additional attributes, e.g. `1` | [] |
| tags | map(string) | Additional tags (e.g. `map(`BusinessUnit`,`XYZ`) | {} |
| name | string | Solution name, e.g. 'app' or 'jenkins' | "rds" |
| enabled | bool | Defines whether this module should create resources | true |
| memory | number | Amount of memory in MB your Lambda Function can use at runtime | 256 |
| timeout | number | The amount of time your Lambda Function has to run in seconds | 30 |
| invoke | bool | Defines whether lambda function should be invoked immediately after provisioning | true |
| allowed_egress_cidr_blocks | list(string) | A list of CIDR blocks allowed to be reached from Lambda. Remember that Lambda ne | [
"0.0.0.0/0"
] |
lambda_iam_role_id — Lambda IAM Role IDlambda_iam_role_name — Lambda IAM Role namelambda_iam_role_arn — Lambda IAM Role ARNlambda_function_arn — Lambda Function ARNlambda_function_name — Lambda Function namelambda_iam_policy_id — Lambda IAM Policy IDlambda_iam_policy_name — Lambda IAM Policy namelambda_iam_policy_arn — Lambda IAM Policy ARNTerraform module to deploy landing zone subscriptions (and much more) in Azure
Terraform Azure Verified Pattern Module for Azure Landing Zone
Terraform Azure Verified Resource Module for Key Vault
Terraform module for building and deploying Next.js apps to AWS. Supports SSR (L