Skip to content

Template for Terraform repositories. Intended for use by automation tools to link Terraform repos to Terraform Cloud.

License

Notifications You must be signed in to change notification settings

MITLibraries/mitlib-tf-template

Repository files navigation

mitlib-tf-template

Template for Terraform repos for MIT Libraries.

After deploying this, the following steps must be completed.

  1. Update the terraform { } block in main.tf. We now use the cloud {} block to link to workspaces in Terraform Cloud. The very first thing to do is set the correct tags in the workspaces {} block.
  2. Update main.tf to include any additional Terraform Provider(s).
  3. Update the terraform { required_providers { } } block in versions.tf to set the location and constraints on the additional providers.
  4. Optional: Update the locals {} block in main.tf to provide a project-id.
  5. Optional: Update the tags {} block in providers.tf to enable a backup plan via AWS Backups
  6. Copy the locals {} block from the deleteme.tf file and paste it into each .tf file that will create named resources.
  7. Delete the deleteme.tf file.
  8. Delete the file tree below.

File Tree

.
├── LICENSE
├── README.md
├── deleteme.tf
├── docs
│   └── adrs
│       ├── 0001-record-architecture-decisions.md
│       └── 0002-upgrade-to-cloud-block.md
├── main.tf
├── modules
│   └── README.md
├── providers.tf
├── ssm_inputs.tf
├── ssm_outputs.tf
├── tests
│   └── README.md
├── variables.tf
└── versions.tf

TF markdown is automatically inserted at the bottom of this file, nothing should be written beyond this point

Requirements

Name Version
terraform ~> 1.2
aws ~> 5.0

Providers

Name Version
aws ~> 5.0

Modules

No modules.

Resources

Name Type
aws_caller_identity.current data source

Inputs

Name Description Type Default Required
appinput_ssm_path Standard prefix in Parameter Store for Terraform outputs specifically needed by string n/a yes
aws_region The AWS region where this infrastructure will be deployed. string "us-east-1" no
environment The name of the environment/stage/workspace (e.g., stage, prod, dev) string n/a yes
mitlib The shortname name of our MITLibraries Organization string "mitlib" no
name The name of the app/resource this code builds string n/a yes
ou The name of the AWS OU that contains the AWS Accounts that are managed by this code. string n/a yes
tfinput_ssm_path Standard prefix in Parameter Store for inputs to Terraform for initial infrastructure builds string n/a yes
tfoutput_ssm_path Standard prefix in Parameter Store for generic Terraform outputs (typically needed by other infra code) string n/a yes

Outputs

No outputs.

About

Template for Terraform repositories. Intended for use by automation tools to link Terraform repos to Terraform Cloud.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 4

  •  
  •  
  •  
  •  

Languages