-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Terraform to seed causes and donations test data to Firesto…
…re (#650) * campaign collection resources * add resources for causes firestore collection * add resources for donations firestore collection * tf fmt Co-authored-by: Roger Martinez <rogerthatdev@gmail.com>
- Loading branch information
1 parent
c6b0153
commit a192c14
Showing
7 changed files
with
2,275 additions
and
1 deletion.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
terraform/modules/emblem-app/files/templates/campaigns.tftpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
${jsonencode({ | ||
name = { | ||
stringValue = name | ||
} | ||
description = { | ||
stringValue = description | ||
} | ||
cause = { | ||
stringValue = cause | ||
} | ||
managers = { | ||
arrayValue = { | ||
values = [ for email in split(",", managers) : { "stringValue": email } ] | ||
} | ||
} | ||
goal = { | ||
integerValue = goal | ||
} | ||
imageUrl = { | ||
stringValue = imageUrl | ||
} | ||
active = { | ||
booleanValue = active | ||
} | ||
})} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
${jsonencode({ | ||
name = { | ||
stringValue = name | ||
} | ||
description = { | ||
stringValue = description | ||
} | ||
imageUrl = { | ||
stringValue = imageUrl | ||
} | ||
active = { | ||
booleanValue = active | ||
} | ||
})} |
11 changes: 11 additions & 0 deletions
11
terraform/modules/emblem-app/files/templates/donations.tftpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
${jsonencode({ | ||
campaign = { | ||
stringValue = campaign | ||
} | ||
donor = { | ||
stringValue = donor | ||
} | ||
amount = { | ||
integerValue = amount | ||
} | ||
})} |
Oops, something went wrong.