4 votes

What is the difference between modules and workspaces in Terraform

Terraform modules are a way to encapsulate reusable business logic in order to be DRY. For example, you might use a module to define a jenkins setup, then invoke that module every time you want a ...
Erik Osterman's user avatar
4 votes

What is the difference between modules and workspaces in Terraform

I think a key difference between Terraform Modules and Workspaces is that modules can be inherited and used by other modules and configurations. Terraform Workspaces are intended to be a collection of ...
Preston Martin's user avatar
  • 3,218
3 votes

Is it possible to store your state for different Terraform Workspaces separately?

This is possible and I just completed a migration at my company. We originally had all our state for all workspaces in a centralized s3 bucket. We now have a separate s3 bucket per workspace, and in ...
Brittan DeYoung's user avatar
2 votes

How to set Terraform Cloud environment variables from the command line?

You can use the Terraform Cloud provider to manage workspace configuration in Terraform Cloud in the same way as you might manage any other infrastructure objects with Terraform. For historical ...
Martin Atkins's user avatar
1 vote

dev/stage/prod in separate AWS accounts, managed via terraform cloud workspaces, how can I use lb ip in DNS records for each env?

One simple way would be to delegate the subdomain of mydomain.com for each account to that account's Route53 service. After you do this, the credentials that allow Terraform to create load balancers, ...
Sotto Voce's user avatar
1 vote

TerraForm separate stages

I don't think there are any best practices because it would depend on both your company structure as well as how your developers manage their code in SCM (gitflow, trunk, etc). Lets start with the ...
Levi's user avatar
  • 1,034
1 vote

Terraform workspaces vs isolated directories?

Workspaces are an unnecessary complexity which causes the possibility that you destroy your prod environment (or leak secrets). It is a much better practice to switch backends, and that is noted in ...
matttrach's user avatar
1 vote

Include verbose output in terraform/terragrunt

You might be able to do something with the local-exec Provisioner to push the information out to an external script or file which you could monitor separately during the run. The issue you might ...
Alastair Montgomery's user avatar
1 vote

Terraform: Delay the MySQL Provider

I think you could achieve something similar by first running Terraform against your RDS resources, and then running Terraform again on all resources. On your first pass, you can use -target option to ...
Yekta Leblebici's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible