File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ terraform {
1212}
1313
1414# Intentionally throws an error if the workspace doesn't match the env
15- # from https://github.com/rhythmictech/terraform-provider -errorcheck
16- resource "errorcheck_is_valid" "workspace_should_match_env " {
17- name = " terraform workspace should match env variable "
18- test = {
19- assert = terraform.workspace == var.env
20- error_message = " Change workspace to match env. Workspace: ${ terraform . workspace } , env: ${ var . env } "
21- }
15+ # from https://github.com/rhythmictech/terraform-terraform -errorcheck
16+ module "does_workspace_match_env " {
17+ source = " rhythmictech/errorcheck/ terraform"
18+ version = " ~> 1.0.0 "
19+
20+ assert = terraform. workspace == var. env
21+ error_message = " Change workspace to match env. Workspace: ' ${ terraform . workspace } ', env: ' ${ var . env } ' "
2222}
2323
2424# =============================================
You can’t perform that action at this time.
0 commit comments