Files
threshold/enos/modules/build_boundary_docker_local/main.tf
T
Michael Li ef3954c561 test(e2e): Add a docker test runner (#3499)
* test(e2e): Add a docker test runner

* !fixup: Self-review

* !fixup: Make vault address compatible with local runs

* !fixup: Remove unnecessary modification

* !fixup: Remove arm64 requirement

* !fixup: extend timeout
2023-07-31 09:10:21 -04:00

46 lines
955 B
Terraform

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
terraform {
required_providers {
enos = {
source = "app.terraform.io/hashicorp-qti/enos"
}
}
}
variable "path" {
description = "Used in `build_boundary_docker_crt`. Not used in this module."
type = string
default = ""
}
variable "cli_build_path" {
description = "Place to store the built binary"
type = string
}
resource "enos_local_exec" "get_git_sha" {
inline = ["git rev-parse --short HEAD"]
}
locals {
image_name = trimspace("docker.io/hashicorp/boundary-dev:latest-${enos_local_exec.get_git_sha.stdout}")
}
resource "enos_local_exec" "build_docker_image" {
environment = {
"IMAGE_NAME" = local.image_name
"ARTIFACT_PATH" = var.cli_build_path
}
scripts = ["${path.module}/build.sh"]
}
output "image_name" {
value = local.image_name
}
output "cli_zip_path" {
value = "${var.cli_build_path}/boundary.zip"
}