Skip to content

Commit 51dc20a

Browse files
VIA-102 AJ/AS Adding support for distinguishing workspaces and storing state
1 parent e246dae commit 51dc20a

File tree

4 files changed

+4
-17
lines changed

4 files changed

+4
-17
lines changed
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
data "external" "git_branch" {
22
program = ["bash", "${path.module}/../../scripts/get_git_branch.sh"]
33
}
4-
5-
data "external" "deploy_source" {
6-
program = ["bash", "${path.module}/../../scripts/get_deploy_source.sh"]
7-
}

infrastructure/environments/dev/locals.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ locals {
44
project_identifier = "vaccinations-app"
55
project_identifier_shortcode = "vita"
66

7-
environment = "dev"
8-
git_branch = coalesce(data.external.git_branch.result.output, "main")
9-
deploy_source = coalesce(data.external.deploy_source.result.output, "lo")
7+
environment = "dev"
8+
git_branch = coalesce(data.external.git_branch.result.output, "na")
9+
deploy_workspace = terraform.workspace == "default" ? "gh" : terraform.workspace
1010

1111
default_tags = {
1212
ManagedBy = "Terraform"

infrastructure/environments/dev/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module "deploy" {
22
source = "../../modules/deploy_app"
33

44
open-next-path = "../../../.open-next"
5-
prefix = "${local.deploy_source}-${local.git_branch}-${local.project_identifier_shortcode}"
5+
prefix = "${local.deploy_workspace}-${local.git_branch}-${local.project_identifier_shortcode}"
66
default_tags = local.default_tags
77
}

infrastructure/scripts/get_deploy_source.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)