diff --git a/components/datadog/agent/docker.go b/components/datadog/agent/docker.go index 93d2fdcfb..7f82a452f 100644 --- a/components/datadog/agent/docker.go +++ b/components/datadog/agent/docker.go @@ -128,15 +128,13 @@ func dockerAgentComposeManifest(agentImagePath string, apiKey pulumi.StringInput func defaultAgentParams(params *dockeragentparams.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" } + if p.JMX { + p.FullImagePath = fmt.Sprintf("%s-jmx", p.FullImagePath) + } }(params) if params.FullImagePath != "" {