Git Product home page Git Product logo

terraform-aws-scheduled-switch's Introduction

Scheduled switch for Terraform managed resources on AWS

This module allows you to apply a pattern of scheduled EventBridge events to manage your Terraform resources. It could be used to simply create, update or destroy resources on schedule. An example where this pattern could be applied to is when you have Terraform managed resources that are incurring costs during unutilized periods of time. Such a solution to spin resources up and down on schedule could help with significant cost savings.

Examples

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

Usage

Requirements

Name Version
terraform >= 0.15.0
aws >= 3.73.0
random >= 3.0

Providers

Name Version
aws >= 3.73.0
random >= 3.0

Modules

No modules.

Resources

Name Type
aws_cloudwatch_event_rule.kill_rule resource
aws_cloudwatch_event_rule.revive_rule resource
aws_cloudwatch_event_target.kill_resources resource
aws_cloudwatch_event_target.revive_resources resource
aws_codebuild_project.switch_codebuild_project resource
aws_codebuild_source_credential.git_credentials resource
aws_iam_policy.codebuild_policy resource
aws_iam_role.codebuild_role resource
aws_iam_role.switch_codebuild_role resource
aws_iam_role_policy.switch_codebuild_s3_backend_policy resource
aws_iam_role_policy.switch_codebuild_ssm_policy resource
aws_iam_role_policy_attachment.codebuild_attachment resource
aws_iam_role_policy_attachment.s3_policy resource
aws_iam_role_policy_attachment.switch_additional_policy resource
aws_ssm_parameter.tf_init_parameter resource
aws_ssm_parameter.tf_kill_parameter resource
aws_ssm_parameter.tf_revive_parameter resource
aws_ssm_parameter.tf_version_parameter resource
random_string.random resource
aws_caller_identity.current data source
aws_iam_policy_document.codebuild_policy data source
aws_iam_policy_document.codebuild_trust data source
aws_partition.current data source

Inputs

Name Description Type Default Required
git_personal_access_token For GitHub or GitHub Enterprise, this is the personal access token. string n/a yes
init_command Terraform command used to initialize working directory. string n/a yes
kill_command Terraform command to destroy the target resources. string n/a yes
kill_resources_schedule Schedule expression in the form of cron or rate expressions. Refer to https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html for more details. string n/a yes
revive_command Terraform command to revive/recreate the target resources. string n/a yes
revive_resources_schedule Schedule expression in the form of cron or rate expressions. Refer to https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html for more details. string n/a yes
source_location Information about the location of the source code of the Terraform configuration that is being managed. string n/a yes
source_type The type of repository that contains the source code to be built. string n/a yes
terraform_version Version of Terraform. string n/a yes
tf_backend_bucket S3 Backend bucket name string n/a yes
tf_backend_key S3 object key to terraform state file string n/a yes
kill_rule_enabled Whether the rule should be enabled. string true no
revive_rule_enabled Whether the rule should be enabled. string true no
switch_additional_policy_arn ARN of additional IAM policy for CodeBuild. string null no

Outputs

No outputs.

terraform-aws-scheduled-switch's People

Contributors

amazon-auto avatar farhanangullia avatar github-actions[bot] avatar semantic-release-bot avatar

Stargazers

 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.