microservice

Flaconi/microservice/aws

Terraform Module HCL AWS

Boilerplate Terraform Module for creating resources for typical micro services.

Install
module "microservice" {
source = "Flaconi/microservice/aws"
version = "5.8.0"
}
plain text: /constructs/tfmod-flaconi-microservice-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Microservice Boilerplate ![lint](https://github.com/flaconi/terraform-aws-microservice/actions?query=workflow%3Alint) ![test](https://github.com/flaconi/terraform-aws-microservice/actions?query=workflow%3Atest) ![Tag](https://github.com/flaconi/terraform-aws-microservice/releases) ![License](https://opensource.org/licenses/MIT) This Terraform module can create typical resources needed for most microservices. Examples DynamoDB IAM RDS Redis S3 SQS Usage DynamoDB Microservice ``hcl 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

Inputs (50)
NameTypeDescriptionDefault
tagsmap(any)tags to propagate to the resources required
sqs2_enabledboolSet to false to prevent the module from creating any sqs resourcesfalse
sqs4_max_message_sizenumberThe number of seconds Amazon SQS retains a message. Integer representing seconds262144
iam_role_principals_arnslist(string)List of ARNs to allow assuming the iam role. Could be AWS services or accounts, []
dynamodb_autoscale_read_targetnumberThe target value for DynamoDB read autoscaling50
dynamodb2_enabledboolSet to false to prevent the module from creating any dynamodb resourcesfalse
rds_enabledboolSet to false to prevent the module from creating any rds resourcesfalse
rds_performance_insights_retention_periodnumberThe amount of time in days to retain Performance Insights data. Either 7 (7 days7
sqs3_enabledboolSet to false to prevent the module from creating any sqs resourcesfalse
sqs4_receive_wait_time_secondsnumberThe time for which a ReceiveMessage call will wait for a message to arrive (long0
dynamodb3_hash_keystringDynamoDB table Hash Key""
dynamodb4_billingstringDynamoDB Billing mode. Can be PROVISIONED or PAY_PER_REQUEST"PROVISIONED"
rds_final_snapshot_identifier_overridestringRDS final snapshot identifier override.""
sqs4_dlq_enabledboolSet to false to prevent the module from creating any sqs-dql resourcesfalse
dynamodb2_range_key_typestringRange Key type, which must be a scalar type: `S`, `N`, or `B` for (S)tring, (N)u"S"
dynamodb3_range_keystringDynamoDB table Range Key""
dynamodb4_name_overridestringdefine dynamodb4_name_override to set a name differnt from var.name""
redis_multi_az_enabledboolSpecifies whether to enable Multi-AZ Support for the replication group. If true,false
rds_option_group_use_name_prefixboolDetermines whether to use `option_group_name` as is or create a unique name begitrue
sqs5_name_overridestringdefine sqs5_name_override to set a name differnt from var.name ""
sqs5_receive_wait_time_secondsnumberThe time for which a ReceiveMessage call will wait for a message to arrive (long0
… and 10 more inputs
Outputs (50)
this_aws_iam_access_key_secret — The secret key of the user
dynamodb_local_secondary_index_names — DynamoDB local index names
dynamodb3_table_stream_arn — DynamoDB table stream ARN
this_aws_s3_bucket_id — id of created S3 bucket
dynamodb_table_stream_label — DynamoDB table stream label
dynamodb2_table_arn — DynamoDB table ARN
dynamodb3_table_name — DynamoDB table name
dynamodb3_local_secondary_index_names — DynamoDB local index names
rds_this_db_instance_availability_zone — The availability zone of the RDS instance
rds_this_db_instance_port — The database port
sqs5_queue_arn — SQS queue ARN
dynamodb_table_stream_arn — DynamoDB table stream ARN
rds_this_db_instance_arn — The ARN of the RDS instance
rds_this_db_instance_username — The master username for the database
sqs2_queue_id — SQS queue ID
dynamodb_table_id — DynamoDB table ID
dynamodb_global_secondary_index_names — DynamoDB secondary index names
this_redis_replication_group_number_cache_clusters — The AWS Elasticache replication group number cache clusters
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)
sqs3_queue_name — SQS queue name
rds_this_db_parameter_group_id — The db parameter group id
sqs5_queue_name — SQS queue name
dynamodb2_global_secondary_index_names — DynamoDB secondary index names
dynamodb3_table_stream_label — DynamoDB table stream label
dynamodb4_table_id — DynamoDB table ID
dynamodb2_table_stream_arn — DynamoDB table stream ARN
dynamodb3_global_secondary_index_names — DynamoDB secondary index names
sqs1_dlq_queue_arn — SQS queue ARN
sqs2_queue_name — SQS queue name
sqs3_queue_arn — SQS queue ARN
… and 20 more outputs
Resources (25)
aws_db_instance_role_associationaws_elasticache_replication_groupaws_elasticache_subnet_groupaws_iam_access_keyaws_iam_policyaws_iam_policy_attachmentaws_iam_roleaws_iam_role_policyaws_iam_role_policy_attachmentaws_iam_useraws_iam_user_policyaws_kms_aliasaws_kms_keyaws_route53_recordaws_s3_bucketaws_s3_bucket_aclaws_s3_bucket_lifecycle_configurationaws_s3_bucket_policyaws_s3_bucket_public_access_blockaws_s3_bucket_server_side_encryption_configurationaws_s3_bucket_versioningaws_security_groupaws_security_group_rulenull_resourcerandom_string
Details
FrameworkTerraform Module
LanguageHCL
Version5.8.0
Cloud AWS
★ Stars18
Forks7
Total downloads6.6k
Inputs50
Outputs50
Resources25
Examples6
LicenseMIT
NamespaceFlaconi
Updated