Skip to content

Commit 0f6ee6a

Browse files
author
Scott Miller
authored
Use new errorcheck module
1 parent ed05088 commit 0f6ee6a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

common/common.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff 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
# =============================================

0 commit comments

Comments
 (0)