Last active
October 12, 2019 07:26
-
-
Save cc4i/b726216fa725fae64858eadf3cf7b08e to your computer and use it in GitHub Desktop.
Run following code with CDK 1.12.0 & failed to call API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cdk = require('@aws-cdk/core'); | |
import ec2 = require( '@aws-cdk/aws-ec2'); | |
import eks = require('@aws-cdk/aws-eks'); | |
import iam = require('@aws-cdk/aws-iam'); | |
export class EksStack extends cdk.Stack { | |
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
const vpc = new ec2.Vpc(this, 'eksClusterVPC'); | |
const cluster = new eks.Cluster(this, "eksCluster", { | |
vpc: vpc, | |
defaultCapacityInstance: ec2.InstanceType.of(ec2.InstanceClass.C5, ec2.InstanceSize.LARGE), | |
defaultCapacity: 1 | |
}); | |
} | |
} |
所以你最後可以了嗎?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
const clusterAdmin = new iam.Role(this, 'AdminRole', {
assumedBy: new iam.AccountRootPrincipal()
});