Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback dashboard #66

Merged
merged 18 commits into from
Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/core/assets.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
resource "null_resource" "upload_assets" {
triggers = {
dir_sha1 = sha1(join("", [for f in fileset("${path.module}/assets", "**"): filesha1("${path.module}/assets/${f}")]))
}
provisioner "local-exec" {
command = <<EOT
az storage blob sync \
--container '$web' \
--account-name ${replace(replace(module.checkout_cdn.name, "-cdn-endpoint", "-sa"), "-", "")} \
--account-key ${module.checkout_cdn.storage_primary_access_key} -s "./assets" \
--destination 'assets/'
az cdn endpoint purge \
-g ${azurerm_resource_group.checkout_fe_rg.name} \
-n ${module.checkout_cdn.name} \
--profile-name ${replace(module.checkout_cdn.name, "-cdn-endpoint", "-cdn-profile")} \
--content-paths "/assets/*" \
--no-wait
EOT
}
}
Binary file added src/core/assets/privacy-disclaimer.pdf
Binary file not shown.
Binary file added src/core/assets/terms-condition.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion src/core/cdn.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module "checkout_cdn" {
lock_enabled = var.lock_enable

index_document = "index.html"
error_404_document = "not_found.html"
error_404_document = "dashboard/index.html"

dns_zone_name = azurerm_dns_zone.selfcare_public[0].name
dns_zone_resource_group_name = azurerm_dns_zone.selfcare_public[0].resource_group_name
Expand Down
2 changes: 1 addition & 1 deletion src/core/contracts-template.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "null_resource" "upload_contract_templates" {
triggers = {
dir_sha1 = sha1(join("", [for f in fileset("${path.module}/contracts_template", "*"): filesha1(f)])) // TODO try to use **
dir_sha1 = sha1(join("", [for f in fileset("${path.module}/contracts_template", "**"): filesha1("${path.module}/contracts_template/${f}")]))
}
provisioner "local-exec" {
command = <<EOT
Expand Down