Skip to content

Commit

Permalink
refactor(ecs): rename canAccesContainerInstanceRole to `canContain…
Browse files Browse the repository at this point in the history
…ersAccessInstanceRole` (#2945)

This change closes #2944 and renames the field appropriately based on its type.

BREAKING CHANGES:

* **ecs**: `canAccesContainerInstanceRole ` => `canContainersAccessInstanceRole`
  • Loading branch information
hencrice authored and rix0rrr committed Jun 20, 2019
1 parent dbf3e17 commit eb76493
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-ecs/lib/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class Cluster extends Resource implements ICluster {
// Tie instances to cluster
autoScalingGroup.addUserData(`echo ECS_CLUSTER=${this.clusterName} >> /etc/ecs/ecs.config`);

if (!options.containersAccessInstanceRole) {
if (!options.canContainersAccessInstanceRole) {
// Deny containers access to instance metadata service
// Source: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/instance_IAM_role.html
autoScalingGroup.addUserData('sudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP');
Expand Down Expand Up @@ -437,7 +437,7 @@ export interface AddAutoScalingGroupCapacityOptions {
*
* @default false
*/
readonly containersAccessInstanceRole?: boolean;
readonly canContainersAccessInstanceRole?: boolean;

/**
* Give tasks this many seconds to complete when instances are being scaled in.
Expand Down

0 comments on commit eb76493

Please sign in to comment.