fleet/infrastructure/loadtesting/terraform/osquery_perf/docker.tf
Jorge Falcon 0471b8ce19
Loadtest - osquery_perf - Removal of fleet_image requirement (#35365)
- Adds support for `enroll.sh`, to deploy osquery_perf in batches
- Merges variables `tag` and `git_branch` into `git_tag_branch`. Only
one tag or git_branch should be specified.
  - Still used for osquery_perf to check out the correct tag/branch.
- Removes fleet_image requirement for cutting osquery_perf images

---------

Co-authored-by: Robert Fairburn <8029478+rfairburn@users.noreply.github.com>
2025-11-10 16:16:20 -05:00

25 lines
647 B
HCL

data "aws_ecr_authorization_token" "token" {}
data "aws_ecr_repository" "fleet" {
name = local.customer
}
resource "docker_registry_image" "loadtest" {
name = docker_image.loadtest.name
keep_remotely = true
}
resource "docker_image" "loadtest" {
name = "${data.aws_ecr_repository.fleet.repository_url}:loadtest-${local.loadtest_tag}-${formatdate("YYYYMMDD-HHmmss", timestamp())}"
keep_locally = true
force_remove = true
build {
context = "../docker/"
dockerfile = "loadtest.Dockerfile"
platform = "linux/amd64"
build_args = {
TAG = local.loadtest_tag
}
pull_parent = true
}
}