Replies: 2 comments
-
const nodegroupNameStrings = Fn.split(
'/',
this.K8sAwsManagedNodeGroupIngress.nodegroup.nodegroupName
);
const ngName = Fn.select(1, nodegroupNameStrings);
const nodeGroupASG = new AwsCustomResource(this, 'nodeGroupASG', {
policy: AwsCustomResourcePolicy.fromSdkCalls({
resources: AwsCustomResourcePolicy.ANY_RESOURCE
}),
onUpdate: {
action: 'describeNodegroup',
service: 'EKS',
physicalResourceId: PhysicalResourceId.of(
'EKS.DescribeNodegroup.nodegroup.resources.autoScalingGroups'
),
outputPaths: ['nodegroup.resources.autoScalingGroups'],
parameters: {
clusterName: this.k8sCluster.k8sCluster.clusterName,
nodegroupName: ngName
}
},
onCreate: {
action: 'describeNodegroup',
service: 'EKS',
physicalResourceId: PhysicalResourceId.of(
'EKS.DescribeNodegroup.nodegroup.resources.autoScalingGroups'
),
outputPaths: ['nodegroup.resources.autoScalingGroups'],
parameters: {
clusterName: this.k8sCluster.k8sCluster.clusterName,
nodegroupName: ngName
}
}
});
const asgName = nodeGroupASG.getResponseField(
'nodegroup.resources.autoScalingGroups.0.name'
);
const asgFromNodegroup = AutoScalingGroup.fromAutoScalingGroupName(
this,
'AsgName',
asgName
); Hi everyone it is a simple workaround that helps to take the ASG from the Nodegroup |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
dzirg44
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to attach ASG that was created via Nodegroup to my ALB, I understand that constructions like
will not work, because we don't have nested children with ASG, but maybe it is possible to take it from the custom resources, etc.?
Beta Was this translation helpful? Give feedback.
All reactions