Skip to content

Automation for Terraform Enterprise

Notifications You must be signed in to change notification settings

jpopilek/fem-eci-terraform-tfe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fem-eci-terraform-tfe

Project structure

  • main.tf - main file defining resources
  • variables.tf - constants that are unchaning like project ids or keys
  • backend.tf - sets up project to sync state with terraform cloud
  • locals.tf - locals can be used to define resources that are then passed into main.tf's modules
  • variables.tf - is used to represent values that are likely to change
  • data.tf - is ued to tell terraform it needs to look something up

important terraform commands

Note using doppler to manage secrets and inject them into command execution

validate changes before pushing

doppler run -- terraform plan -out "terraform.tfplan"

validate syntax

terraform validate

init

terraform init

Apply

doppler run -- terraform apply "terraform.tfplan"

Gotchas

in some instances you will need to "move a resource". This happens in particular when you get a warning something is to be destroyed you don't want post a change. ex.) moved { from =module.project to =module.project["fem-eci-project"]}

About

Automation for Terraform Enterprise

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages