Skip to content

Commit cbb1e11

Browse files
committed
make tests pass when credentials file is missing. take 3
1 parent 1657216 commit cbb1e11

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ec2/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ locals {
6464
bastion_sg_name = "${var.cluster_name}-bastion-sg"
6565

6666
unison_credentials_file = "~/.local/share/unisonlanguage/credentials.json"
67-
unison_credentials = jsondecode(fileexists(local.unison_credentials_file) ? file(local.unison_credentials_file) : "{}")
67+
unison_credentials = jsondecode(fileexists(local.unison_credentials_file) ? file(local.unison_credentials_file) : "{\"default\": {\"api.unison-lang.org\": {\"tokens\": {\"access_token\": \"\"}}}}")
6868
unison_token = local.unison_credentials.credentials.default["api.unison-lang.org"].tokens.access_token
6969
}
7070

eks/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ locals {
3434
dynamodb_table_name = "${var.cluster_name}-state"
3535

3636
unison_credentials_file = "~/.local/share/unisonlanguage/credentials.json"
37-
unison_credentials = jsondecode(fileexists(local.unison_credentials_file) ? file(local.unison_credentials_file) : "{}")
37+
unison_credentials = jsondecode(fileexists(local.unison_credentials_file) ? file(local.unison_credentials_file) : "{\"credentials\":{\"default\": {\"api.unison-lang.org\": {\"tokens\": {\"access_token\": \"\"}}}}}")
3838
unison_token = local.unison_credentials.credentials.default["api.unison-lang.org"].tokens.access_token
3939
}
4040

0 commit comments

Comments
 (0)