From 51cd5b6de8e4ce180fd2b8ed9c83060ca3524048 Mon Sep 17 00:00:00 2001 From: Vikentiy Fesunov Date: Wed, 18 Dec 2024 14:34:46 +0000 Subject: [PATCH] Fix order of suffixes The image name is `foo-fips-jmx`. `-fips` must be added to the suffix first, thus it's defer must come last. --- components/datadog/agent/docker.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/datadog/agent/docker.go b/components/datadog/agent/docker.go index 6d9008166..93d2fdcfb 100644 --- a/components/datadog/agent/docker.go +++ b/components/datadog/agent/docker.go @@ -127,17 +127,17 @@ func dockerAgentComposeManifest(agentImagePath string, apiKey pulumi.StringInput } func defaultAgentParams(params *dockeragentparams.Params) { - defer func(p *dockeragentparams.Params) { - if p.FIPS { - p.FullImagePath += "-fips" - } - }(params) // After setting params.FullImagePath check if you need to use JMX Docker image defer func(p *dockeragentparams.Params) { if p.JMX { p.FullImagePath = fmt.Sprintf("%s-jmx", p.FullImagePath) } }(params) + defer func(p *dockeragentparams.Params) { + if p.FIPS { + p.FullImagePath += "-fips" + } + }(params) if params.FullImagePath != "" { return