-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(agent,frontend): bump versions and use github releases (except f…
…or s3 static content)
- Loading branch information
1 parent
5e3a55e
commit 8d5a44f
Showing
28 changed files
with
150 additions
and
726 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,9 @@ | ||
locals { | ||
filename_zipped = endswith(var.filename, ".zip") ? var.filename : "${var.filename}.zip" | ||
filename_unzipped = endswith(var.filename, ".zip") ? substr(var.filename, 0, length(var.filename) - 4) : var.filename | ||
filepath = "${path.module}/.terraform/${local.filename_zipped}" | ||
extract_path = "${path.module}/.terraform/${local.filename_unzipped}" | ||
extract_cmd = "unzip -o ${local_file.write.filename} -d \"${local.extract_path}\"" | ||
} |
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,19 @@ | ||
resource "local_file" "write" { | ||
content = var.content.content | ||
content_base64 = var.content.content_base64 | ||
filename = local.filepath | ||
} | ||
|
||
resource "terraform_data" "unarchive" { | ||
input = local.extract_path | ||
triggers_replace = [ | ||
local.extract_cmd, | ||
timestamp() # Force re-run on every apply | ||
] | ||
|
||
provisioner "local-exec" { | ||
command = local.extract_cmd | ||
} | ||
|
||
depends_on = [local_file.write] | ||
} |
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,3 @@ | ||
output "output_path" { | ||
value = terraform_data.unarchive.output | ||
} |
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,22 @@ | ||
variable "filename" { | ||
description = "The name of the zip file" | ||
type = string | ||
} | ||
|
||
variable "content" { | ||
description = "The content of a zip file" | ||
type = object({ | ||
content = optional(string) | ||
content_base64 = optional(string) | ||
}) | ||
|
||
validation { | ||
condition = var.content.content != null || var.content.content_base64 != null | ||
error_message = "Either content or content_base64 must be provided" | ||
} | ||
|
||
validation { | ||
condition = var.content.content == null || var.content.content_base64 == null | ||
error_message = "Only one of content or content_base64 must be provided" | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
stacks/frontend-edge/versions.tf → modules/unarchive-zip/versions.tf
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
terraform { | ||
required_version = ">= 1.5.0" | ||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = "~> 5.0" | ||
local = { | ||
source = "hashicorp/local" | ||
version = "~> 2.0" | ||
} | ||
} | ||
} |
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.