Reference: Resource Providers - https://aws-quickstart.github.io/cdk-eks-blueprints/resource-providers/
The VPC ID will be saved into the SSM parameter store to refer from other stacks.
Parameter Name : /cdk-eks-blueprints/vpc-id
Use the -c vpcId
context parameter if you want to use the existing VPC.
cd vpc
cdk deploy
2 CDK stacks are created eks-blueprint and eks-blueprint-local
.
cd ../blueprints
cdk deploy eks-blueprint/local
# cdk deploy eks-blueprint/dev -c stage=dev
# or define your VPC id with context parameter
cdk deploy eks-blueprint/local -c vpcId=<vpc-id>
Cluster Name: blueprints-existing-vpc/lib/cluster-config.ts
blueprints-existing-vpc/lib/cluster-stack.ts
Outputs:
eks-blueprint-local.Cluster = eks-blueprint-local
eks-blueprint-local.ClusterArn = arn:aws:eks:us-east-1:123456789012:cluster/eks-blueprint-local
eks-blueprint-local.ClusterCertificateAuthorityData = xxxxxxxx
eks-blueprint-local.ClusterEncryptionConfigKeyArn =
eks-blueprint-local.ClusterEndpoint = https://123456789012.gr7.us-east-1.eks.amazonaws.com
eks-blueprint-local.ClusterName = eks-blueprint-local
eks-blueprint-local.ClusterSecurityGroupId = sg-0123456789abc
eks-blueprint-local.VPC = vpc-0123456789abc
eks-blueprint-local.eksclusterConfigCommand515C0544 = aws eks update-kubeconfig --name eks-blueprint-local --region us-east-1 --role-arn arn:aws:iam::123456789012:role/eks-blueprint-local-iamrole10180D71-D83FQPH1BRW3
eks-blueprint-local.eksclusterGetTokenCommand3C33A2A5 = aws eks get-token --cluster-name eks-blueprint-local --region us-east-1 --role-arn arn:aws:iam::123456789012:role/eks-blueprint-local-iamrole10180D71-D83FQPH1BRW3