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

fix: scopeo usage #1324

Closed
wants to merge 4 commits into from
Closed
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
25 changes: 25 additions & 0 deletions infrastructure/quick-deploy/aws/ecr.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,21 @@ locals {
}

default_tags = module.default_images.image_tags

#information for fluent-bit image retagging.
fluent_bit_repository_uri = [
for name, uri in module.ecr.repositories : uri
if can(regex("fluent-bit", name))
][0]
fluent_bit_image_tag = [
for name, details in local.repositories :
details.tag if can(regex("fluent-bit", details.image))
][0]
region = data.aws_region.current.name
}

data "aws_region" "current" {}

# Default tags for all images
module "default_images" {
source = "./generated/infra-modules/utils/default-images"
Expand All @@ -103,3 +116,15 @@ module "ecr" {
encryption_type = var.ecr.encryption_type
tags = local.tags
}

#Temporary solution for image retagging while waiting for the muli-plateform image from fluent-bit: https://github.com/fluent/fluent-bit/issues/9509
resource "generic_local_cmd" "build_fluent-bit_image" {
count = var.upload_images ? 1 : 0

provisioner "local-exec" {
# build the muti-platform image in the registry
command = <<EOT
docker buildx imagetools create ${local.fluent_bit_repository_uri}:${local.fluent_bit_image_tag} --tag ${local.fluent_bit_repository_uri}:${local.fluent_bit_image_tag} --append ${var.fluent_bit.image_name}:windows-2022-${local.fluent_bit_image_tag}
EOT
}
}
4 changes: 4 additions & 0 deletions infrastructure/quick-deploy/aws/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,9 @@ terraform {
source = "chilicat/pkcs12"
version = "~> 0.0.7"
}
generic = {
source = "aneoconsulting.github.io/aneoconsulting/generic"
version = "~> 0.1.0"
}
}
}
Loading