Support Terraform workspaces for creating infra on demand #981

Closed
opened 2022-11-22 20:12:31 +01:00 by dsalaza4 · 1 comment
dsalaza4 commented 2022-11-22 20:12:31 +01:00 (Migrated from github.com)

We can use Terraform workspaces to provision multiple replicas of the same infrastructure. This can be very useful when dealing with development environments.

Let's make Terraform builtins support passing an environment variable name that can be later evaluated to use a specific Terraform workspace.

That way it would be possible to use custom Makes jobs for selecting a workspace and then passing it via environment to such builtins.

Make the following builtins support a workspace environment variable:

  • testTerraform
  • deployTerraform
  • taintTerraform
We can use [Terraform workspaces](https://medium.com/devops-mojo/terraform-workspaces-overview-what-is-terraform-workspace-introduction-getting-started-519848392724) to provision multiple replicas of the same infrastructure. This can be very useful when dealing with development environments. Let's make Terraform builtins support passing an environment variable name that can be later evaluated to use a specific Terraform workspace. That way it would be possible to use custom Makes jobs for selecting a workspace and then passing it via environment to such builtins. Make the following builtins support a workspace environment variable: - [x] testTerraform - [x] deployTerraform - [x] taintTerraform
dsalaza4 commented 2022-11-22 20:21:26 +01:00 (Migrated from github.com)

I think creating a workspaceForTerraformFromEnv builtin that could later be imported by the setup would be much better.

I think creating a `workspaceForTerraformFromEnv` builtin that could later be imported by the setup would be much better.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
justin/makes#981
No description provided.