Skip to content

Commit 658753c

Browse files
authored
feat: add --no-assign-public-ip flag for Fargate (#3643)
1 parent d38a728 commit 658753c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/artillery/lib/cmds/run-fargate.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ RunCommand.flags = {
177177
}),
178178
'max-duration': Flags.string({
179179
description: 'Maximum duration of the test run'
180+
}),
181+
'no-assign-public-ip': Flags.boolean({
182+
description:
183+
'Turn off the default behavior of assigning public IPs to Fargate worker tasks. When this option is used you must make sure tasks have a route to the internet, i.e. via a NAT gateway attached to a private subnet',
184+
default: false
180185
})
181186
};
182187

packages/artillery/lib/platform/aws-ecs/legacy/run-cluster.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,10 @@ async function setupDefaultECSParams(context) {
16001600
subnets: context.fargatePublicSubnetIds
16011601
}
16021602
};
1603+
1604+
if (context.cliOptions.noAssignPublicIp) {
1605+
defaultParams.awsvpcConfiguration.assignPublicIp = 'DISABLED';
1606+
}
16031607
} else {
16041608
defaultParams.launchType = 'EC2';
16051609
}

0 commit comments

Comments
 (0)