Skip to content

Latest commit

 

History

History

example-com_sns

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Getting Started with Terraform SNS Module

module "default" {
  source = "../modules/cloudtrailconsole"
  name   = "cloudTrailConsole"

  s3 = {
    name = "example-com-non-prd-cloudtrail"
  }

  sns = {
    sns_topic = {
      topic_arn = "arn:aws:sns:us-east-1:123456789012:CloudTrail"
    }
  }

  lambda = {
    # **Note**: Increase memory if you are experiencing slow s3 reads"
    memory                         = 128
    timeout                        = 15
    reserved_concurrent_executions = 10
    environment_variables          = {}
    # **Note**: Depending on your Terraform directory structure you might need to define the filepath.
    filepath = "../../../cloudtrail-console-actions/dist/function.zip"
  }

  # slack does not need to be defined for cloudwatch logs to be emitted
  slack = {
    # If you have a single account
    # name = ":maple_leaf: NON-PRD"

    # channel = "#aws-console-actions"
    # webhook = "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"

    # If you have multiple accounts
    # accounts = {
    #   123456789012 = ":maple_leaf: NON-PRD"
    # }
  }

  tags = {
    terraform = true
    managedBy = "local_state"
  }
}

Requirements

No requirements.

Providers

Name Version
aws n/a

Modules

No modules.

Resources

Name Type
aws_iam_role.default resource
aws_iam_role_policy.default resource
aws_lambda_function.default resource
aws_lambda_permission.default resource
aws_sns_topic_subscription.default resource
aws_caller_identity.current data source
aws_iam_policy_document.default data source
aws_iam_policy_document.sts data source
aws_region.current data source
aws_s3_bucket.default data source

Inputs

Name Description Type Default Required
lambda Lambda Settings any {} no
name Name of the Lambda, IAM Role and CloudWatch Log Groups string "cloudTrailConsole" no
s3 S3 Bucket Settings any {} no
slack Slack Settings any {} no
sns SNS Settings any {} no
tags A mapping of tags to supply to the resources map(string) {} no

Outputs

Name Description
aws_caller_identity The AWS caller identity value used for grabbing account_id, current user, etc.
default Returns a nested map of the configured resources