broad-dog-22463
04/19/2022, 10:54 PMglamorous-camera-26392
04/20/2022, 6:39 AMinactive
, but the task is not stopped, so the new definition is never used to create new tasks.
relevant ecs code looks like
const cluster = new awsx.ecs.Cluster('mycluster', { vpc });
const myecs = new awsx.ecs.EC2Service('myservice', {
cluster,
securityGroups,
taskDefinitionArgs: {
containers: {
flyway: {
image: 'my/flyway:latest',
entryPoint: ['/bin/sh'],
command: ['-c', 'flyway -url=${JDBC_URL} -user=${POSTGRES_USER} -password=${POSTGRES_PASSWORD} migrate'],
cpu: 1,
memory: 1024,
essential: false,
environment: [
{ 'name': 'POSTGRES_PASSWORD', 'value': dbPassword },
{ 'name': 'JDBC_URL', 'value': jdbcUrl },
{ 'name': 'POSTGRES_USER', 'value': dbUsername },
],
},
myservice: {
image: 'my/service:latest',
cpu: 2,
memory: 2750,
environment: [
{ 'name': 'JDBC_PASSWORD', 'value': dbPassword },
{ 'name': 'JDBC_URL', 'value': jdbcUrl },
{ 'name': 'JDBC_USER', 'value': dbUsername },
],
portMappings: [web],
essential: true,
dependsOn: [{
containerName: 'flyway',
condition: 'SUCCESS'
}],
},
},
},
});
billowy-horse-79629
04/20/2022, 8:41 AMfancy-eve-82724
04/20/2022, 8:48 PMwarning: bucket is deprecated: Use the aws_s3_object resource instead
fancy-eve-82724
04/20/2022, 8:49 PMminiature-oxygen-33318
04/21/2022, 3:46 PMpulumi_aws.apigateqway.RestApi
I have a class which has an input arg `api`type pulumi_aws.apigateway
(`api: pulumi_aws.apigateway
)and I need to test the values of api.id
and `api.id.apply`but I’m struggling to work out how to mock this up.
I found this https://www.pulumi.com/docs/guides/testing/unit/ but I can’t work out how to apply it to my case - is there more documentation; or preferably more complex examples to follow?
Thanks!acoustic-truck-53557
04/21/2022, 7:15 PMfierce-manchester-32400
04/21/2022, 7:16 PMstocky-petabyte-29883
04/22/2022, 10:01 AMmagnificent-church-42829
04/22/2022, 5:55 PMmagnificent-church-42829
04/22/2022, 5:58 PMicy-controller-6092
04/24/2022, 12:59 AMworried-terabyte-60325
04/24/2022, 7:50 AM{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAssumeRole",
"Effect": "Allow",
"Principal": "<http://ec2.amazonaws.com|ec2.amazonaws.com>",
"Action": "sts:AssumeRole"
}
]
}
Which is different from AWS' doc
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "<http://ec2.amazonaws.com|ec2.amazonaws.com>"
},
"Action": "sts:AssumeRole"
}
]
}
Different schema on Principal
field. And that will cause error like: Error creating IAM Role xxx-role-53da5df: MalformedPolicyDocument: Syntax error at position (6,41)
.worried-terabyte-60325
04/24/2022, 10:42 AMExtraNodeSecurityGroups
to a NodeGroup?
I met the same issue as https://github.com/pulumi/pulumi-eks/issues/616, have got any luck to solve it by my own😢quaint-book-39362
04/25/2022, 10:37 PMquaint-book-39362
04/25/2022, 10:38 PMaverage-school-38756
04/26/2022, 7:11 PMthousands-area-40147
04/26/2022, 9:01 PMmagnificent-church-42829
04/26/2022, 10:41 PMcommand.remote.ConnectionArgs
, command.remote.CopyFile
, and command.remote.Command
but this wouldn’t work if the instance is in a private subnet.green-daybreak-91402
04/28/2022, 10:40 AM@pulumi/awsx
package for API Gateway, how are subroutes setup? Im trying to setup a route like this: /test/{proxy+}
but get this error:
Unable to create resource at path '/{proxy+}/{proxy+}': Cannot create a child of a resource with a greedy path variable: {proxy+}
I cant find an example of how to setup subroutes, this is how Ive setup my routes:
{
path: '/test/{proxy+}',
apiKeyRequired: false,
method: 'ANY',
eventHandler: functions.testFunction,
},
{
path: '/{proxy+}',
method: 'ANY',
apiKeyRequired: true,
target: apiServerTarget,
},
green-daybreak-91402
04/28/2022, 11:55 AMawsx.apigateway
is appending a {proxy+}
route to all created paths, so it is duplicating paths. I see this happening no matter the integration type i select for my path/route.
Any way to specify a route and match exactly the path without creating a {proxy+}
sub-resource?delightful-monkey-90700
04/28/2022, 5:38 PMpolite-napkin-90098
04/28/2022, 6:17 PMquaint-guitar-13446
04/29/2022, 4:54 AMportMappings
on a awsx.ecs.FargateService
container. I want both port 80 and 443 forwarded to the fargate service. For some reason, only the first target group gets a registered targetquaint-guitar-13446
04/29/2022, 4:55 AMconst service = new awsx.ecs.FargateService(n('caddy-service'), {
cluster,
taskDefinitionArgs: {
container: {
image: caddyImage,
environment: getCaddyEnvironment(),
portMappings: targetGroups,
},
volumes: [
{
name: 'certificates',
efsVolumeConfiguration: {
fileSystemId: certificatesEfs.efs.id,
authorizationConfig: {
accessPointId: certificatesEfs.ap.id,
iam: 'ENABLED',
},
transitEncryption: 'ENABLED',
},
},
],
executionRole: ecsExecutionRole,
taskRole: createFargateTaskRole('caddy', [certificatesEfs.mountPolicy]),
},
waitForSteadyState: false,
});
quaint-guitar-13446
04/29/2022, 4:56 AMconst httpListener = loadBalancer.createListener(n('http'), {
vpc,
port: 80,
protocol: 'TCP',
loadBalancer,
targetGroup: {
vpc,
port: 80,
protocol: 'TCP',
targetType: 'ip',
loadBalancer,
}
});
const httpsListener = loadBalancer.createListener(n('https'), {
vpc,
port: 443,
protocol: 'TCP',
loadBalancer,
targetGroup: {
vpc,
port: 443,
protocol: 'TCP',
targetType: 'ip',
loadBalancer,
},
quaint-guitar-13446
04/29/2022, 4:57 AMportMappings
. I also tried creating the target groups separately. In this code I'm passing listener.defaultTargetGroup
quaint-guitar-13446
04/29/2022, 6:00 AM"portMappings": [
{
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp"
},
{
"containerPort": 443,
"hostPort": 443,
"protocol": "tcp"
}
],
It's just that it does not register both entries into a target groupkind-keyboard-17263
04/29/2022, 4:59 PMconst pulumi = require("@pulumi/pulumi");
const aws = require("@pulumi/aws");
const awsx = require("@pulumi/awsx");
// Create a public HTTP endpoint (using AWS APIGateway)
const endpoint = new awsx.apigateway.API("hello", {
routes: [
// Serve a simple REST API on `GET /name` (using AWS Lambda)
{
path: "/source",
method: "GET",
eventHandler: (req: any, ctx: any, cb: any) => {
cb(undefined, {
statusCode: 200,
body: Buffer.from(JSON.stringify({ name: "AWS" }), "utf8").toString("base64"),
isBase64Encoded: true,
headers: { "content-type": "application/json" },
})
}
}
]
});
// Export the public URL for the HTTP service
exports.url = endpoint.url;
but I am having the following error:
Type Name Status Info
pulumi:pulumi:Stack store_event-dev **failed** 1 error; 2 warnings └─ aws:apigateway:x:API hello
~ ├─ aws:apigateway:RestApi hello updated
+ └─ aws:apigateway:Deployment hello **creating failed** 1 error
Diagnostics:
aws:apigateway:Deployment (hello):
error: 1 error occurred:
* Error creating API Gateway Deployment: BadRequestException: The REST API doesn't contain any methods
pulumi:pulumi:Stack (store_event-dev):
warning: resource plugin aws is expected to have version >=5.3.0, but has 5.2.0; the wrong version may be on your path, or this may be a bug in the plugin
warning: resource plugin aws is expected to have version >=5.3.0, but has 5.2.0; the wrong version may be on your path, or this may be a bug in the plugin
error: update failed
Resources:
~ 1 updated
13 unchanged
Duration: 4s
Which I am not able to find much about 😕green-crowd-42127
04/29/2022, 8:37 PMApplicationLoadBalancerTargetGroup
, it looks like I don't have the ability to set the loadBalancingAlgorithmType
even though is only a setting available to ApplicationLoadBalancerTargetGroups
.
Example Code:
const loadBalancer = new awsx.lb.ApplicationLoadBalancer(`${resourcePrefix}ALB`, { securityGroups: [ sg ] }, { replaceOnChanges: ['*'] });
const targetGroup = loadBalancer.createTargetGroup(
`${resourcePrefix}Group`, {
targetType: "instance",
healthCheck: { ... },
// Would expect loadBalancingAlgorithmType to be set here
// but it is not a property of type: ApplicationTargetGroupArgs
}, { replaceOnChanges: ['*'] });
It's creating each target group as a round_robin
which isn't ideal for what I'm building. Any work arounds besides going into the console and editing it?