big-potato-91793
02/09/2021, 3:55 PMaws:autoscaling:Group (resource1):
error: aws:autoscaling/group:Group resource 'resource1' has a problem: Attribute should be a list
Error: invocation of aws:ec2/getVpc:getVpc returned an error: transport is closing
at /Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/runtime/invoke.js:139:33
at Http2CallStream.<anonymous> (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@grpc/grpc-js/src/client.ts:155:9)
at Http2CallStream.emit (events.js:228:7)
at /Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@grpc/grpc-js/src/call-stream.ts:186:14
at processTicksAndRejections (internal/process/task_queues.js:76:11)
Error: invocation of aws:ec2/getVpc:getVpc returned an error: transport is closing
at /Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/runtime/invoke.js:139:33
at Http2CallStream.<anonymous> (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@grpc/grpc-js/src/client.ts:155:9)
at Http2CallStream.emit (events.js:228:7)
at /Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@grpc/grpc-js/src/call-stream.ts:186:14
at processTicksAndRejections (internal/process/task_queues.js:76:11)
Error: invocation of aws:ec2/getVpc:getVpc returned an error: transport is closing
at /Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/runtime/invoke.js:139:33
at Http2CallStream.<anonymous> (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@grpc/grpc-js/src/client.ts:155:9)
at Http2CallStream.emit (events.js:228:7)
at /Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@grpc/grpc-js/src/call-stream.ts:186:14
at processTicksAndRejections (internal/process/task_queues.js:76:11)
unhandled rejection: CONTEXT(1162): resource:prd2697-nonprod-tm1-gateway-ec2-deployment[aws:lb/loadBalancer:LoadBalancer]
STACK_TRACE:
Error:
at Object.debuggablePromise (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/runtime/debuggable.js:69:75)
at Object.registerResource (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/runtime/resource.js:219:18)
at new Resource (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/resource.js:215:24)
at new CustomResource (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/resource.js:307:9)
at new LoadBalancer (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/lb/loadBalancer.ts:284:9)
at Object.<anonymous> (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/aws.ts:91:13)
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Module.m._compile (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/ts-node/src/index.ts:439:23)
at Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Object.require.extensions.<computed> [as .ts] (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/ts-node/src/index.ts:442:12)
unhandled rejection: CONTEXT(1162): resource:prd2697-nonprod-tm1-gateway-ec2-deployment[aws:lb/loadBalancer:LoadBalancer]
STACK_TRACE:
Error:
at Object.debuggablePromise (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/runtime/debuggable.js:69:75)
at Object.registerResource (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/runtime/resource.js:219:18)
at new Resource (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/resource.js:215:24)
at new CustomResource (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/resource.js:307:9)
at new LoadBalancer (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/lb/loadBalancer.ts:284:9)
at Object.<anonymous> (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/aws.ts:91:13)
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Module.m._compile (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/ts-node/src/index.ts:439:23)
at Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Object.require.extensions.<computed> [as .ts] (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/ts-node/src/index.ts:442:12)
unhandled rejection: CONTEXT(1162): resource:prd2697-nonprod-tm1-gateway-ec2-deployment[aws:lb/loadBalancer:LoadBalancer]
STACK_TRACE:
Error:
at Object.debuggablePromise (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/runtime/debuggable.js:69:75)
at Object.registerResource (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/runtime/resource.js:219:18)
at new Resource (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/resource.js:215:24)
at new CustomResource (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/resource.js:307:9)
at new LoadBalancer (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/lb/loadBalancer.ts:284:9)
at Object.<anonymous> (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/aws.ts:91:13)
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Module.m._compile (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/ts-node/src/index.ts:439:23)
at Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Object.require.extensions.<computed> [as .ts] (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/ts-node/src/index.ts:442:12)
error: Running program '/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws' failed with an unhandled exception:
Error: invocation of aws:ec2/getVpc:getVpc returned an error: transport is closing
at /Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@pulumi/pulumi/runtime/invoke.js:139:33
at Http2CallStream.<anonymous> (/Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@grpc/grpc-js/src/client.ts:155:9)
at Http2CallStream.emit (events.js:228:7)
at /Users/Alexandre.Lemieux/tm/tm1/gateway/pulumi/aws/node_modules/@grpc/grpc-js/src/call-stream.ts:186:14
at processTicksAndRejections (internal/process/task_queues.js:76:11)
brief-printer-34348
02/09/2021, 4:06 PMbig-potato-91793
02/09/2021, 4:10 PMenv | grep "AWS" <aws:tm-nonprod-prd198-Ops-Techops>
AWS_PROFILE=tm-nonprod-prd198-Ops-Techops
AWS_REGION=eu-central-1
billowy-army-68599
02/09/2021, 4:15 PMbrief-printer-34348
02/09/2021, 4:15 PMaws describe-vpcs
big-potato-91793
02/09/2021, 4:20 PMaws ec2 describe-vpcs
this one worksconst assumeRolePolicy = aws.iam.getPolicyDocument({
statements: [{
actions: ['sts:AssumeRole'],
principals: [{
type: 'Service',
identifiers: ['<http://ec2.amazonaws.com|ec2.amazonaws.com>'],
}],
effect: 'Allow',
}],
});
const iamRole = new aws.iam.Role(awsResourceName, {
assumeRolePolicy: assumeRolePolicy.then(policy => policy.json),
permissionsBoundary: permissionBoundaryName,
});
const instanceProfile = new aws.iam.InstanceProfile(awsResourceName, {
role: iamRole,
});
const launchConfiguration = new aws.ec2.LaunchConfiguration(awsResourceName, {
namePrefix: `${awsResourceName}.app-`,
imageId: iamByRegion[config.region],
instanceType: config.instanceType,
securityGroups: selectedSecurityGroup.ids,
userData: getUserData(),
keyName: sshKeyName,
enableMonitoring: config.enableMonitoring,
iamInstanceProfile: instanceProfile,
});
const targetGroup = new aws.alb.TargetGroup(awsResourceName, {
namePrefix: 'tm1g-',
port: 8080,
protocol: 'HTTP',
vpcId: selectedVpc.id.apply(id => id),
deregistrationDelay: 90,
healthCheck: {
interval: 5,
path: '/actuator/health',
port: '9100',
protocol: 'HTTP',
timeout: 3,
healthyThreshold: 2,
unhealthyThreshold: 3,
},
});
const asg = new aws.autoscaling.Group(awsResourceName, {
minSize: config.minAvailable,
maxSize: config.replicas,
desiredCapacity: config.replicas,
forceDelete: true,
launchConfiguration: launchConfiguration,
targetGroupArns: [targetGroup.arn],
vpcZoneIdentifiers: ['subnet-085096f399a4bccd8', 'subnet-6276db0a', 'subnet-cb34c7b1'],
// terminationPolicies: ['OldestLaunchConfiguration'],
terminationPolicies: [],
waitForCapacityTimeout: '20m',
waitForElbCapacity: 1,
healthCheckGracePeriod: 600,
healthCheckType: 'ELB',
});
const alb = new aws.lb.LoadBalancer(awsResourceName, {
internal: config.albInternal,
loadBalancerType: aws.alb.LoadBalancerType.Application,
securityGroups: selectedSecurityGroup.ids,
subnets: selectedSubnetIds.ids,
});
const httpListener = new aws.alb.Listener(awsResourceName, {
loadBalancerArn: alb.arn.apply(arn => arn),
port: 80,
protocol: 'HTTP',
defaultActions: [
{
targetGroupArn: targetGroup.arn.apply(arn => arn),
type: 'forward',
},
],
});
autotag
transformation that we adapted from @big-piano-35669 on github.GroupTag[]
instead of a Record<string,string>