Skip to content

Commit

Permalink
nests agent_config under the requried 'value' property of config['apm…
Browse files Browse the repository at this point in the history
…-server']

in order to pass validation checks
  • Loading branch information
ogupte committed Jun 2, 2021
1 parent 62379ad commit 2d522ce
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,17 @@ export function getPackagePolicyWithAgentConfigurations(
agentConfigurations: AgentConfiguration[]
) {
const [firstInput, ...restInputs] = packagePolicy.inputs;
const apmServer = firstInput?.config?.[APM_SERVER];
const apmServerValue = firstInput?.config?.[APM_SERVER].value;
return {
...packagePolicy,
inputs: [
{
...firstInput,
config: {
[APM_SERVER]: {
...apmServer,
agent_config: {
value: agentConfigurations.map((configuration) => ({
value: {
...apmServerValue,
agent_config: agentConfigurations.map((configuration) => ({
service: configuration.service,
config: configuration.settings,
etag: configuration.etag,
Expand Down

0 comments on commit 2d522ce

Please sign in to comment.