Giter Club home page Giter Club logo

terraform-aws-efs-refresh-orchestrator's Introduction

Terraform Module

This is a Terraform module for deploying the EFS refresh orchestrator on AWS.

How to Use This Module

Basic Example :

module "refresh_efs" {
  source = "akirosit/efs-refresh-orchestrator/aws"

  # Network informations
  vpc_id              = "vpc-XXX"
  private_subnets_ids = [ "subnet-xxx", "subnet-yyy"] # used for lambda deployment

  # Main informations
  source_efs_id    = "fs-xxxx"
  efs_id           = "fs-yyyy"
  efs_sg_id        = "sg-xxxx"
  encrypted        = false
  kms_key_id       = null
  items_to_restore = [ "/path" ]
  delete_old_efs   = false

  # Store EFS infos in SSM Parameter store
  store_efs_metadata_in_ssm       = true
  efs_id_ssm_parameter_name       = "/efs-1/efs-id"
  efs_sub_path_ssm_parameter_name = "/efs-1/efs-sub-path"

  # For refresh inputs
  s3_bucket_name                           = "bucket-refresh-xxx"
  put_step_function_input_json_files_on_s3 = true

  # Tags
  app_name = "refresh"
  env_name = "preprod"
  tags = {
    Name            = "efs-1"
    CostCenter      = "CCXXYYY"
  }
}

Requirements

Name Version
terraform >= 1.1.0
aws >= 3.0.0

Providers

Name Version
archive n/a
aws >= 3.0.0
local n/a
null n/a

Inputs

Name Description Type Default Required
app_name Application name string n/a yes
create_s3_bucket Create S3 bucket to put step function input json files bool false no
delete_old_efs Delete old EFS bool false no
efs_id The EFS id to be refreshed string n/a yes
efs_id_ssm_parameter_name SSM parameter name to store the EFS ID string n/a yes
efs_sg_id The EFS security group ID string n/a yes
efs_sub_path_ssm_parameter_name SSM parameter name to store the EFS sub path string n/a yes
encrypted New/refresh cluster is encrypted bool false no
env_name Environment name string n/a yes
items_to_restore Items to restore from source EFS list(string) n/a yes
kms_key_id KMS key to encrypt new/refresh cluster string null no
private_subnets_ids The private subnets IDs (where lambda functions will be deployed) list(string) n/a yes
put_step_function_input_json_files_on_s3 Push or not step function input json files to S3 bucket bool false no
s3_bucket_name Name of the bucket s3 created within this module or existing S3 name to put step function input json files string null no
sns_topic_arn Existing SNS topic ARN to send notifications string null no
source_efs_id The source EFS ID string n/a yes
store_efs_metadata_in_ssm Store EFS ID and sub path in SSM bool false no
tags Additional tags (e.g. map('BusinessUnit,XYZ) map(string) {} no
vpc_id The VPC ID (where lambda functions will be deployed) any n/a yes

Outputs

Name Description
iam_role_step_function n/a
state_machine_name n/a
step_function_dynamodb_arn n/a
step_function_json_files n/a
step_function_sns_arn n/a
vpc_security_group_for_lambda n/a

Resources

Name Type
aws_dynamodb_table.dynamodbTable resource
aws_iam_policy.lambda_role resource
aws_iam_policy.step_function_delete_old_efs resource
aws_iam_policy.step_function_parameter_store resource
aws_iam_policy.step_function_role resource
aws_iam_role.lambda resource
aws_iam_role.step_function resource
aws_iam_role_policy_attachment.lambda_basic_execution resource
aws_iam_role_policy_attachment.lambda_role resource
aws_iam_role_policy_attachment.lambda_vpc_access resource
aws_iam_role_policy_attachment.step_function_delete_old_efs resource
aws_iam_role_policy_attachment.step_function_parameter_store resource
aws_iam_role_policy_attachment.step_function_role resource
aws_lambda_function.functions resource
aws_lambda_layer_version.layer resource
aws_s3_bucket.refresh_bucket resource
aws_s3_object.lambda_functions resource
aws_s3_object.lambda_functions_hash resource
aws_s3_object.step_function_json_input resource
aws_s3_object.step_function_json_input_hash resource
aws_security_group.lambda resource
aws_security_group_rule.efs_from_lambda resource
aws_security_group_rule.lambda_efs_egress resource
aws_security_group_rule.lambda_https_egress resource
aws_sfn_state_machine.refresh_env resource
aws_sns_topic.refresh resource
local_file.step_function_json_input resource
null_resource.pip_install resource
archive_file.lambda_functions data source
archive_file.lambda_layers data source
aws_caller_identity.current data source
aws_efs_file_system.old_efs data source
aws_iam_policy_document.assume_from_lambda data source
aws_iam_policy_document.assume_from_step_functions data source
aws_iam_policy_document.lambda_role data source
aws_iam_policy_document.step_function_delete_old_efs data source
aws_iam_policy_document.step_function_parameter_store data source
aws_iam_policy_document.step_function_role data source
aws_region.current data source

terraform-aws-efs-refresh-orchestrator's People

Contributors

clark42 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.