Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public constructor(name: string, args: CallbackFunctionArgs, opts: pulumi.CustomResourceOptions = {}) {
if (!name) {
throw new Error("Missing required resource name");
}
if (args.callback && args.callbackFactory) {
throw new pulumi.RunError("Cannot provide both [callback] and [callbackFactory]");
}
const func = args.callback || args.callbackFactory;
if (!func) {
throw new Error("One of [callback] or [callbackFactory] must be provided.");
}
let role: iam.Role;
if (args.role) {
role = args.role;
} else {
// Attach a role and then, if there are policies, attach those too.
role = new iam.Role(name, {
assumeRolePolicy: JSON.stringify(lambdaRolePolicy),
}, opts);
function onEvent(name: string, logGroup: cloudwatch.LogGroup, handler: LogGroupEventHandler, args?: LogGroupEventSubscriptionArgs, opts?: pulumi.ResourceOptions): LogGroupEventSubscription {
throw new RunError("NYI");
}
constructor(
name: string, table: dynamodb.Table, func: lambda.Function,
args: TableEventSubscriptionArgs, opts?: pulumi.ResourceOptions) {
super("aws-serverless:dynamodb:TableEventSubscription", name, func, { table: table }, opts);
throw new RunError("NYI");
}
}
function onEvent(name: string, stream: kinesis.Stream, handler: StreamEventHandler,
args: StreamEventSubscriptionArgs, opts?: pulumi.ResourceOptions): StreamEventSubscription {
throw new RunError("NYI");
}
function createLambda(handler: Handler | undefined): pulumi.Output | undefined {
if (!handler) {
return undefined;
}
throw new RunError("NYI");
}
constructor(name: string, args: NodeGroupOptions, opts?: pulumi.ComponentResourceOptions) {
super("eks:index:NodeGroup", name, args, opts);
const k8sProvider = this.getProvider("kubernetes:core:v1/ConfigMap");
if (k8sProvider === undefined) {
throw new pulumi.RunError("a 'kubernetes' provider must be specified for a 'NodeGroup'");
}
const group = createNodeGroup(name, args, this, k8sProvider);
this.nodeSecurityGroup = group.nodeSecurityGroup;
this.cfnStack = group.cfnStack;
this.registerOutputs(undefined);
}
}
const cfnStackDeps: Array = [];
const core = isCoreData(args.cluster) ? args.cluster : args.cluster.core;
const eksCluster = core.cluster;
if (core.vpcCni !== undefined) {
cfnStackDeps.push(core.vpcCni);
}
if (core.eksNodeAccess !== undefined) {
cfnStackDeps.push(core.eksNodeAccess);
}
let eksClusterIngressRule: aws.ec2.SecurityGroupRule = args.clusterIngressRule!;
if (args.nodeSecurityGroup) {
nodeSecurityGroup = args.nodeSecurityGroup;
if (eksClusterIngressRule === undefined) {
throw new pulumi.RunError(`invalid args for node group ${name}, eksClusterIngressRule is required when nodeSecurityGroup is manually speicified`);
}
} else {
nodeSecurityGroup = createNodeGroupSecurityGroup(name, {
vpcId: core.vpcId,
clusterSecurityGroup: core.clusterSecurityGroup,
eksCluster: eksCluster,
}, parent);
eksClusterIngressRule = new aws.ec2.SecurityGroupRule(`${name}-eksClusterIngressRule`, {
description: "Allow pods to communicate with the cluster API Server",
type: "ingress",
fromPort: 443,
toPort: 443,
protocol: "tcp",
securityGroupId: core.clusterSecurityGroup.id,
sourceSecurityGroupId: nodeSecurityGroup.id,
}, { parent: parent });
constructor(
name: string, stream: kinesis.Stream, func: lambda.Function,
args: StreamEventSubscriptionArgs, opts?: pulumi.ResourceOptions) {
super("aws-serverless:kinesis:StreamEventSubscription", name, func, { stream: stream }, opts);
throw new RunError("NYI");
}
}
function createLambdaAndGetArn(handler: Handler): pulumi.Output {
throw new RunError("NYI");
}
constructor(
name: string, logGroup: cloudwatch.LogGroup, func: lambda.Function,
args: LogGroupEventSubscriptionArgs, opts?: pulumi.ResourceOptions) {
super("aws-serverless:cloudwatch:LogGroupEventSubscription", name, func, { logGroup: logGroup }, opts);
throw new RunError("NYI");
}
}