Skip to content

stormreply/storm-library-for-terraform

Repository files navigation

Storm Library for Terraform

The Storm Library for Terraform is a collection of Terraform modules for Amazon Web Services. The focus of these modules, maintained in separate GitHub™ repositories, is on building examples, demos and showcases on AWS. The audience of the library is learners and presenters alike - people that want to know or show how a certain service, pattern or solution looks like, or "feels".

In order to be able to try out these examples, demos and showcases quickly, the Storm Library for Terraform additionally provides a set of GitHub workflows which allow for terraform plan, apply and destroy them in an AWS environment. Optionally, a simple scheduler can be activated to destroy modules after a given time automatically or to deploy them with a delay, if necessary.

Building parts

The Storm Library for Terraform is made up of four building parts:

The Catalog

A catalog of GitHub repositories contributing to the SLT. The catalog is a yaml file containing metadata for each contributing repository like a catalog number, the GitHub URL, a short description, authors, publishing date and other items. The catalog is located in this very repository, storm-library-for-terraform.

More about the catalog

The Scheduler

The Scheduler is based on the GitHub Scheduler and checks for scheduled terraform apply or destroy jobs every 4 hours by default. Jobs are managed as S3 objects containing a timestamp and metadata both in their name and in their data. The scheduler is also part of this repository.

More about the scheduler

The Workflows

Every SLT member repository must contain the same set of GitHub workflows. These workflows are merely triggers for reusable workflows implemented in the slt-workflows repository that can be used to terraform plan, apply, test and destroy resources in the SLT member repository immediately and easily.

More about the workflows

The SLT repositories

The SLT "member" repositories are designed to contain examples, demos and showcases. However they could also contain best patterns or reusable modules; there is no strict rule about their essence apart from that users must be able to plan, apply, test and destroy them from the common set of GitHub workflows. Every member repository tries to implement best practices and enforce them to some extent by using pre-commit hooks, however this approach may sometimes reach its limits for the sake of the example, demo or showcase.

More about the member repositories

Dependencies within the SLT

Building Parts

Installation

Terraform Docs

Click to show

Requirements

Name Version
terraform >= 1
aws >= 6

Providers

Name Version
aws >= 6

Modules

No modules.

Resources

Name Type
aws_iam_role.terraform_backend_role resource
aws_iam_role.terraform_deployment_role resource
aws_iam_role_policy.terraform_backend_policy resource
aws_iam_role_policy_attachment.terraform_deployment_role resource
aws_caller_identity.current data source
aws_iam_policy_document.github_oidc_trust_policy data source
aws_iam_policy_document.terraform_backend_policy data source

Inputs

Name Description Type Default Required
_metadata Select metadata passed from GitHub Workflows
object({
actor = string # Github actor (deployer) of the deployment
catalog_id = string # SLT catalog id of this module
deployment = string # slt-<catalod_id>--
ref = string # Git reference of the deployment
ref_name = string # Git ref_name (branch) of the deployment
repo = string # GitHub short repository name (without owner) of the deployment
repository = string # GitHub full repository name (including owner) of the deployment
sha = string # Git (full-length, 40 char) commit SHA of the deployment
short_name = string # slt-<catalog_id>-
time = string # Timestamp of the deployment
})
{
"actor": "",
"catalog_id": "",
"deployment": "",
"ref": "",
"ref_name": "",
"repo": "",
"repository": "",
"sha": "",
"short_name": "",
"time": ""
}
no
backend_bucket Central backend bucket of the Storm Library for Terraform (SLT)™ string n/a yes
oidc_principal Github owner (org or user) of repositories permitted to deploy to AWS string n/a yes

Outputs

Name Description
_default_tags Default tags to be used in Terraform provider, cf. providers.tf
_metadata Select metadata passed from GitHub Workflows
_name_tag Name to be used as name property of your resources. If you happen to have multiple
resources of the same type, append your -purpose to the name tag.

Contribute

The SLT is intended to be a community project.

About

The central workflow controller repository for the Storm Library for Terraform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors