diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.3f579d6c1ab146cac713730c96809dd4a9c5d9750440fb835ab20fd6925e528c.zip b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.3f579d6c1ab146cac713730c96809dd4a9c5d9750440fb835ab20fd6925e528c.zip deleted file mode 100644 index 39ed532285050..0000000000000 Binary files a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.3f579d6c1ab146cac713730c96809dd4a9c5d9750440fb835ab20fd6925e528c.zip and /dev/null differ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.9202bb21d52e07810fc1da0f6acf2dcb75a40a43a9a2efbcfc9ae39535c6260c.zip b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.9202bb21d52e07810fc1da0f6acf2dcb75a40a43a9a2efbcfc9ae39535c6260c.zip new file mode 100644 index 0000000000000..1f8754c916705 Binary files /dev/null and b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.9202bb21d52e07810fc1da0f6acf2dcb75a40a43a9a2efbcfc9ae39535c6260c.zip differ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/cluster.d.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/cluster.d.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/cluster.d.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/cluster.d.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/cluster.js b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/cluster.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/cluster.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/cluster.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/cluster.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/cluster.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/cluster.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/cluster.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/common.d.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/common.d.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/common.d.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/common.d.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/common.js b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/common.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/common.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/common.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/common.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/common.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/common.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/common.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/compareLogging.d.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/compareLogging.d.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/compareLogging.d.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/compareLogging.d.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/compareLogging.js b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/compareLogging.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/compareLogging.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/compareLogging.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/compareLogging.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/compareLogging.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/compareLogging.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/compareLogging.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/consts.d.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/consts.d.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/consts.d.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/consts.d.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/consts.js b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/consts.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/consts.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/consts.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/consts.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/consts.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/consts.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/consts.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/fargate.d.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/fargate.d.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/fargate.d.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/fargate.d.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/fargate.js b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/fargate.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/fargate.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/fargate.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/fargate.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/fargate.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/fargate.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/fargate.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/index.d.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/index.d.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/index.d.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/index.d.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/index.js new file mode 100644 index 0000000000000..a53ec4c9cde7a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/index.js @@ -0,0 +1,68 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isComplete = exports.onEvent = void 0; +/* eslint-disable no-console */ +// eslint-disable-next-line import/no-extraneous-dependencies +const client_eks_1 = require("@aws-sdk/client-eks"); +// eslint-disable-next-line import/no-extraneous-dependencies +const credential_providers_1 = require("@aws-sdk/credential-providers"); +// eslint-disable-next-line import/no-extraneous-dependencies +const node_http_handler_1 = require("@aws-sdk/node-http-handler"); +// eslint-disable-next-line import/no-extraneous-dependencies +const proxy_agent_1 = require("proxy-agent"); +const cluster_1 = require("./cluster"); +const consts = require("./consts"); +const fargate_1 = require("./fargate"); +const proxyAgent = new proxy_agent_1.ProxyAgent(); +const awsConfig = { + logger: console, + requestHandler: new node_http_handler_1.NodeHttpHandler({ + httpAgent: proxyAgent, + httpsAgent: proxyAgent, + }), +}; +let eks; +const defaultEksClient = { + createCluster: req => getEksClient().createCluster(req), + deleteCluster: req => getEksClient().deleteCluster(req), + describeCluster: req => getEksClient().describeCluster(req), + describeUpdate: req => getEksClient().describeUpdate(req), + updateClusterConfig: req => getEksClient().updateClusterConfig(req), + updateClusterVersion: req => getEksClient().updateClusterVersion(req), + createFargateProfile: req => getEksClient().createFargateProfile(req), + deleteFargateProfile: req => getEksClient().deleteFargateProfile(req), + describeFargateProfile: req => getEksClient().describeFargateProfile(req), + configureAssumeRole: (req) => { + eks = new client_eks_1.EKS({ + ...awsConfig, + credentials: (0, credential_providers_1.fromTemporaryCredentials)({ + params: req, + }), + }); + }, +}; +function getEksClient() { + if (!eks) { + throw new Error('EKS client not initialized (call "configureAssumeRole")'); + } + return eks; +} +async function onEvent(event) { + const provider = createResourceHandler(event); + return provider.onEvent(); +} +exports.onEvent = onEvent; +async function isComplete(event) { + const provider = createResourceHandler(event); + return provider.isComplete(); +} +exports.isComplete = isComplete; +function createResourceHandler(event) { + switch (event.ResourceType) { + case consts.CLUSTER_RESOURCE_TYPE: return new cluster_1.ClusterResourceHandler(defaultEksClient, event); + case consts.FARGATE_PROFILE_RESOURCE_TYPE: return new fargate_1.FargateProfileResourceHandler(defaultEksClient, event); + default: + throw new Error(`Unsupported resource type "${event.ResourceType}`); + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsNkRBQTZEO0FBQzdELG9EQUEwQztBQUMxQyw2REFBNkQ7QUFDN0Qsd0VBQXlFO0FBQ3pFLDZEQUE2RDtBQUM3RCxrRUFBNkQ7QUFDN0QsNkRBQTZEO0FBQzdELDZDQUF5QztBQUN6Qyx1Q0FBbUQ7QUFFbkQsbUNBQW1DO0FBQ25DLHVDQUEw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BvcnQgYXN5bmMgZnVuY3Rpb24gaXNDb21wbGV0ZShldmVudDogQVdTTGFtYmRhLkNsb3VkRm9ybWF0aW9uQ3VzdG9tUmVzb3VyY2VFdmVudCk6IFByb21pc2U8SXNDb21wbGV0ZVJlc3BvbnNlPiB7XG4gIGNvbnN0IHByb3ZpZGVyID0gY3JlYXRlUmVzb3VyY2VIYW5kbGVyKGV2ZW50KTtcbiAgcmV0dXJuIHByb3ZpZGVyLmlzQ29tcGxldGUoKTtcbn1cblxuZnVuY3Rpb24gY3JlYXRlUmVzb3VyY2VIYW5kbGVyKGV2ZW50OiBBV1NMYW1iZGEuQ2xvdWRGb3JtYXRpb25DdXN0b21SZXNvdXJjZUV2ZW50KSB7XG4gIHN3aXRjaCAoZXZlbnQuUmVzb3VyY2VUeXBlKSB7XG4gICAgY2FzZSBjb25zdHMuQ0xVU1RFUl9SRVNPVVJDRV9UWVBFOiByZXR1cm4gbmV3IENsdXN0ZXJSZXNvdXJjZUhhbmRsZXIoZGVmYXVsdEVrc0NsaWVudCwgZXZlbnQpO1xuICAgIGNhc2UgY29uc3RzLkZBUkdBVEVfUFJPRklMRV9SRVNPVVJDRV9UWVBFOiByZXR1cm4gbmV3IEZhcmdhdGVQcm9maWxlUmVzb3VyY2VIYW5kbGVyKGRlZmF1bHRFa3NDbGllbnQsIGV2ZW50KTtcbiAgICBkZWZhdWx0OlxuICAgICAgdGhyb3cgbmV3IEVycm9yKGBVbnN1cHBvcnRlZCByZXNvdXJjZSB0eXBlIFwiJHtldmVudC5SZXNvdXJjZVR5cGV9YCk7XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/index.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/index.ts similarity index 94% rename from packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/index.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/index.ts index a6e6980e9ec83..4004ddf5cd22e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/index.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea/index.ts @@ -5,15 +5,14 @@ import { EKS } from '@aws-sdk/client-eks'; import { fromTemporaryCredentials } from '@aws-sdk/credential-providers'; // eslint-disable-next-line import/no-extraneous-dependencies import { NodeHttpHandler } from '@aws-sdk/node-http-handler'; +// eslint-disable-next-line import/no-extraneous-dependencies +import { ProxyAgent } from 'proxy-agent'; import { ClusterResourceHandler } from './cluster'; import { EksClient } from './common'; import * as consts from './consts'; import { FargateProfileResourceHandler } from './fargate'; import { IsCompleteResponse } from '../../../custom-resources/lib/provider-framework/types'; -// eslint-disable-next-line @typescript-eslint/no-require-imports, import/no-extraneous-dependencies -const ProxyAgent = require('proxy-agent'); - const proxyAgent = new ProxyAgent(); const awsConfig = { logger: console, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/index.js deleted file mode 100644 index e3d914f9b8064..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31/index.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isComplete = exports.onEvent = void 0; -/* eslint-disable no-console */ -// eslint-disable-next-line import/no-extraneous-dependencies -const client_eks_1 = require("@aws-sdk/client-eks"); -// eslint-disable-next-line import/no-extraneous-dependencies -const credential_providers_1 = require("@aws-sdk/credential-providers"); -// eslint-disable-next-line import/no-extraneous-dependencies -const node_http_handler_1 = require("@aws-sdk/node-http-handler"); -const cluster_1 = require("./cluster"); -const consts = require("./consts"); -const fargate_1 = require("./fargate"); -// eslint-disable-next-line @typescript-eslint/no-require-imports, import/no-extraneous-dependencies -const ProxyAgent = require('proxy-agent'); -const proxyAgent = new ProxyAgent(); -const awsConfig = { - logger: console, - requestHandler: new node_http_handler_1.NodeHttpHandler({ - httpAgent: proxyAgent, - httpsAgent: proxyAgent, - }), -}; -let eks; -const defaultEksClient = { - createCluster: req => getEksClient().createCluster(req), - deleteCluster: req => getEksClient().deleteCluster(req), - describeCluster: req => getEksClient().describeCluster(req), - describeUpdate: req => getEksClient().describeUpdate(req), - updateClusterConfig: req => getEksClient().updateClusterConfig(req), - updateClusterVersion: req => getEksClient().updateClusterVersion(req), - createFargateProfile: req => getEksClient().createFargateProfile(req), - deleteFargateProfile: req => getEksClient().deleteFargateProfile(req), - describeFargateProfile: req => getEksClient().describeFargateProfile(req), - configureAssumeRole: (req) => { - eks = new client_eks_1.EKS({ - ...awsConfig, - credentials: (0, credential_providers_1.fromTemporaryCredentials)({ - params: req, - }), - }); - }, -}; -function getEksClient() { - if (!eks) { - throw new Error('EKS client not initialized (call "configureAssumeRole")'); - } - return eks; -} -async function onEvent(event) { - const provider = createResourceHandler(event); - return provider.onEvent(); -} -exports.onEvent = onEvent; -async function isComplete(event) { - const provider = createResourceHandler(event); - return provider.isComplete(); -} -exports.isComplete = isComplete; -function createResourceHandler(event) { - switch (event.ResourceType) { - case consts.CLUSTER_RESOURCE_TYPE: return new cluster_1.ClusterResourceHandler(defaultEksClient, event); - case consts.FARGATE_PROFILE_RESOURCE_TYPE: return new fargate_1.FargateProfileResourceHandler(defaultEksClient, event); - default: - throw new Error(`Unsupported resource type "${event.ResourceType}`); - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsNkRBQTZEO0FBQzdELG9EQUEwQztBQUMxQyw2REFBNkQ7QUFDN0Qsd0VBQXlFO0FBQ3pFLDZEQUE2RDtBQUM3RCxrRUFBNkQ7QUFDN0QsdUNBQW1EO0FBRW5ELG1DQUFtQztBQUNuQyx1Q0FBMEQ7QUFHMUQsb0dBQW9HO0FBQ3BHLE1BQU0sVUFBVSxHQUFHLE9BQU8sQ0FBQyxhQUFhLENBQUMsQ0FBQztBQUUxQyxNQUFNLFVBQVUsR0FBRyxJQUFJLFVBQVUsRUFBRSxDQUFDO0FBQ3BDLE1BQU0sU0FBUyxHQUFHO0lBQ2hCLE1BQU0sRUFBRSxPQUFPO0lBQ2YsY0FBYyxFQUFFLElBQUksbUNBQWUsQ0FBQztRQUNsQyxTQUFTLEVBQUUsVUFBVTtRQUNyQixVQUFVLEVBQUUsVUFBVTtLQUN2QixDQUFDO0NBQ0gsQ0FBQztBQUVGLElBQUksR0FBb0IsQ0FBQztBQUV6QixNQUFNLGdCQUFnQixHQUFjO0lBQ2xDLGFBQWEsRUFBRSxHQUFHLENBQUMsRUFBRSxDQUFDLFlBQVksRUFBRSxDQUFDLGFBQWEsQ0FBQyxHQUFHLENBQUM7SUFDdkQsY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kN1c3RvbVJlc291cmNlRXZlbnQpIHtcbiAgc3dpdGNoIChldmVudC5SZXNvdXJjZVR5cGUpIHtcbiAgICBjYXNlIGNvbnN0cy5DTFVTVEVSX1JFU09VUkNFX1RZUEU6IHJldHVybiBuZXcgQ2x1c3RlclJlc291cmNlSGFuZGxlcihkZWZhdWx0RWtzQ2xpZW50LCBldmVudCk7XG4gICAgY2FzZSBjb25zdHMuRkFSR0FURV9QUk9GSUxFX1JFU09VUkNFX1RZUEU6IHJldHVybiBuZXcgRmFyZ2F0ZVByb2ZpbGVSZXNvdXJjZUhhbmRsZXIoZGVmYXVsdEVrc0NsaWVudCwgZXZlbnQpO1xuICAgIGRlZmF1bHQ6XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoYFVuc3VwcG9ydGVkIHJlc291cmNlIHR5cGUgXCIke2V2ZW50LlJlc291cmNlVHlwZX1gKTtcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/aws-cdk-eks-cluster-test.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/aws-cdk-eks-cluster-test.assets.json index 168e179bcd186..f802306395198 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/aws-cdk-eks-cluster-test.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/aws-cdk-eks-cluster-test.assets.json @@ -15,29 +15,29 @@ } } }, - "3f579d6c1ab146cac713730c96809dd4a9c5d9750440fb835ab20fd6925e528c": { + "9202bb21d52e07810fc1da0f6acf2dcb75a40a43a9a2efbcfc9ae39535c6260c": { "source": { - "path": "asset.3f579d6c1ab146cac713730c96809dd4a9c5d9750440fb835ab20fd6925e528c.zip", + "path": "asset.9202bb21d52e07810fc1da0f6acf2dcb75a40a43a9a2efbcfc9ae39535c6260c.zip", "packaging": "file" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "3f579d6c1ab146cac713730c96809dd4a9c5d9750440fb835ab20fd6925e528c.zip", + "objectKey": "9202bb21d52e07810fc1da0f6acf2dcb75a40a43a9a2efbcfc9ae39535c6260c.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31": { + "acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea": { "source": { - "path": "asset.bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31", + "path": "asset.acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31.zip", + "objectKey": "acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } @@ -127,7 +127,7 @@ } } }, - "9ed92d6ca2f94ae73ed093332b1f59259597979e72e0d3ed2f89c0a775034d7b": { + "10f52f7e1cae4868df3700d82e3d31b19d73ad74fa99aefab4a7e994f5752106": { "source": { "path": "awscdkeksclustertestawscdkawseksClusterResourceProvider5F388D1A.nested.template.json", "packaging": "file" @@ -135,7 +135,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "9ed92d6ca2f94ae73ed093332b1f59259597979e72e0d3ed2f89c0a775034d7b.json", + "objectKey": "10f52f7e1cae4868df3700d82e3d31b19d73ad74fa99aefab4a7e994f5752106.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } @@ -155,7 +155,7 @@ } } }, - "f50b3b98b38aa353e06b0440b8467a084c8f4727c45a3b6cd28669a7f6f5945d": { + "6be1ccd4181b8be66d2ddaca1de5fc94578bd0ef370c51f60f4f0e701f3e598e": { "source": { "path": "aws-cdk-eks-cluster-test.template.json", "packaging": "file" @@ -163,7 +163,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "f50b3b98b38aa353e06b0440b8467a084c8f4727c45a3b6cd28669a7f6f5945d.json", + "objectKey": "6be1ccd4181b8be66d2ddaca1de5fc94578bd0ef370c51f60f4f0e701f3e598e.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/aws-cdk-eks-cluster-test.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/aws-cdk-eks-cluster-test.template.json index b76903f01b706..2931ae48e3b42 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/aws-cdk-eks-cluster-test.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/aws-cdk-eks-cluster-test.template.json @@ -4178,7 +4178,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "/9ed92d6ca2f94ae73ed093332b1f59259597979e72e0d3ed2f89c0a775034d7b.json" + "/10f52f7e1cae4868df3700d82e3d31b19d73ad74fa99aefab4a7e994f5752106.json" ] ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/awscdkeksclustertestawscdkawseksClusterResourceProvider5F388D1A.nested.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/awscdkeksclustertestawscdkawseksClusterResourceProvider5F388D1A.nested.template.json index 75083f6d75292..d74a1782e02b5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/awscdkeksclustertestawscdkawseksClusterResourceProvider5F388D1A.nested.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/awscdkeksclustertestawscdkawseksClusterResourceProvider5F388D1A.nested.template.json @@ -7,7 +7,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "3f579d6c1ab146cac713730c96809dd4a9c5d9750440fb835ab20fd6925e528c.zip" + "S3Key": "9202bb21d52e07810fc1da0f6acf2dcb75a40a43a9a2efbcfc9ae39535c6260c.zip" }, "Description": "/opt/nodejs/node_modules/proxy-agent" } @@ -50,7 +50,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31.zip" + "S3Key": "acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea.zip" }, "Description": "onEvent handler for EKS cluster resource provider", "Environment": { @@ -115,7 +115,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31.zip" + "S3Key": "acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea.zip" }, "Description": "isComplete handler for EKS cluster resource provider", "Environment": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/manifest.json index 52f99fa11aab2..f58bb6dbb9596 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/manifest.json @@ -17,7 +17,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/f50b3b98b38aa353e06b0440b8467a084c8f4727c45a3b6cd28669a7f6f5945d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/6be1ccd4181b8be66d2ddaca1de5fc94578bd0ef370c51f60f4f0e701f3e598e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/tree.json index 33fb17e796dbe..29d7be4a86904 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.js.snapshot/tree.json @@ -5422,7 +5422,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "s3Key": "3f579d6c1ab146cac713730c96809dd4a9c5d9750440fb835ab20fd6925e528c.zip" + "s3Key": "9202bb21d52e07810fc1da0f6acf2dcb75a40a43a9a2efbcfc9ae39535c6260c.zip" }, "description": "/opt/nodejs/node_modules/proxy-agent" } @@ -5535,7 +5535,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "s3Key": "bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31.zip" + "s3Key": "acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea.zip" }, "description": "onEvent handler for EKS cluster resource provider", "environment": { @@ -5667,7 +5667,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "s3Key": "bb544555825b6abfdf2cf0c13f9410a77d62ad0fe0bf5c38cef55631cf427f31.zip" + "s3Key": "acb2f8cda93fc5e8f324cbdf29471a1182441f7707645a562b4d29eb57c80eea.zip" }, "description": "isComplete handler for EKS cluster resource provider", "environment": { @@ -6569,7 +6569,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "/9ed92d6ca2f94ae73ed093332b1f59259597979e72e0d3ed2f89c0a775034d7b.json" + "/10f52f7e1cae4868df3700d82e3d31b19d73ad74fa99aefab4a7e994f5752106.json" ] ] } diff --git a/packages/aws-cdk-lib/aws-eks/lib/cluster-resource-handler/index.ts b/packages/aws-cdk-lib/aws-eks/lib/cluster-resource-handler/index.ts index a6e6980e9ec83..4004ddf5cd22e 100644 --- a/packages/aws-cdk-lib/aws-eks/lib/cluster-resource-handler/index.ts +++ b/packages/aws-cdk-lib/aws-eks/lib/cluster-resource-handler/index.ts @@ -5,15 +5,14 @@ import { EKS } from '@aws-sdk/client-eks'; import { fromTemporaryCredentials } from '@aws-sdk/credential-providers'; // eslint-disable-next-line import/no-extraneous-dependencies import { NodeHttpHandler } from '@aws-sdk/node-http-handler'; +// eslint-disable-next-line import/no-extraneous-dependencies +import { ProxyAgent } from 'proxy-agent'; import { ClusterResourceHandler } from './cluster'; import { EksClient } from './common'; import * as consts from './consts'; import { FargateProfileResourceHandler } from './fargate'; import { IsCompleteResponse } from '../../../custom-resources/lib/provider-framework/types'; -// eslint-disable-next-line @typescript-eslint/no-require-imports, import/no-extraneous-dependencies -const ProxyAgent = require('proxy-agent'); - const proxyAgent = new ProxyAgent(); const awsConfig = { logger: console,