Skip to content

Latest commit

 

History

History
76 lines (60 loc) · 3.47 KB

README.md

File metadata and controls

76 lines (60 loc) · 3.47 KB

Terraform AWS Serverless App Module

Terraform module to create AWS Serverless application.

How to use:

module "pecan" {
  name            = "pecan"
  source          = "hazelops/sls-app/aws"
  env             = var.env
  vpc_id          = module.vpc.vpc_id
  public_subnets  = module.vpc.public_subnets
  private_subnets = module.vpc.private_subnets
  security_groups = ["sg-xxxxxxxxxxxxxxxxx"]
  
  parameters = {
    "API_KEY": "demo"
  }
  
  app_secrets = [
    "demo_secret_name"
  ]

  global_parameters = {}
  global_secrets    = []
}

Requirements

Name Version
terraform >= 1.0
aws ~> 5.0

Providers

Name Version
aws ~> 5.0

Modules

Name Source Version
global_secrets hazelops/ssm-secrets/aws ~> 1.0
secrets hazelops/ssm-secrets/aws ~> 1.0

Resources

Name Type
aws_ssm_parameter.sls_global_parameter resource
aws_ssm_parameter.sls_parameter resource

Inputs

Name Description Type Default Required
app_secrets List of SSM ParameterStore secret parameters - by default, /$var.env/$var.name/* list(any) [] no
env n/a any n/a yes
global_parameters Map of SSM ParameterStore global parameters to store - by default, /$var.env/global/* map(string) {} no
global_secrets List of SSM ParameterStore global secrets - by default, /$var.env/global/* list(any) [] no
join_lists Whether to join lists like subnets and security groups into a one SSM parameter string with comma separator bool false no
name n/a any n/a yes
parameters Map of SSM ParameterStore parameters to store - by default, /$var.env/$var.name/* map(string) n/a yes
private_subnets VPC Private subnets to place SLS resources list(any) [] no
public_subnets VPC Public subnets to place SLS resources list(any) [] no
security_groups Security groups to assign to SLS list(any) [] no
serialize_lists Whether to serialize lists like subnets and security groups into a one SSM parameter bool true no
vpc_id AWS VPC ID string "-" no

Outputs

No outputs.