Skip to content

Commit

Permalink
adding list of scopes under ipam
Browse files Browse the repository at this point in the history
  • Loading branch information
shikha372 committed Aug 1, 2024
1 parent 2f35dc1 commit 429e6eb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/@aws-cdk/aws-vpcv2-alpha/lib/ipam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ class IpamScope extends Resource implements IIpamScopeBase {
this.scopeId = this._ipamScope.attrIpamScopeId;
this.scope = scope;
this.props = props;
this.n;
}

/**
Expand Down Expand Up @@ -433,7 +432,7 @@ export class Ipam extends Resource {
/**
* List of custom scopes created under this IPAM
*/
public readonly customScopes: IIpamScopeBase[] = [];
public readonly scopes: IIpamScopeBase[] = [];

constructor(scope: Construct, id: string, props?: IpamProps) {
super(scope, id);
Expand All @@ -455,10 +454,9 @@ export class Ipam extends Resource {
ipamScopeId: this._ipam.attrPrivateDefaultScopeId,
});

this.node.defaultChild = this.publicScope.scope;
this.node.defaultChild = this.privateScope.scope;
this.customScopes.forEach(customScope => {
this.node.defaultChild = customScope.scope;
this.scopes.push(this.publicScope, this.privateScope);
this.scopes.forEach(node => {
this.node.defaultChild = node.scope;
});
}

Expand All @@ -472,7 +470,7 @@ export class Ipam extends Resource {
ipamId: this.ipamId,
ipamOperatingRegions: this.operatingRegions,
});
this.customScopes.push(ipamScope);
this.scopes.push(ipamScope);
return ipamScope;
}
}
Expand Down

0 comments on commit 429e6eb

Please sign in to comment.