fast-island-38778
09/16/2022, 6:15 AMbright-orange-69401
09/16/2022, 7:29 AMpulumi up
when dependencies haven’t changed much ?few-mechanic-54967
09/16/2022, 3:05 PMsteep-toddler-94095
09/16/2022, 9:17 PMaws:context
even means
error: Missing required configuration variable 'aws:context'
I'm just trying to use the getBucketObject
function
getBucketObject(
{
bucket: "bucketName",
key: `/blah/blah.json`,
},
{
provider: new Provider("us-east-2", {
assumeRole: awsConfig.requireObject("assumeRole"),
allowedAccountIds: awsConfig.requireObject("allowedAccountIds"),
region: "us-east-2",
}),
}
)
fast-island-38778
09/16/2022, 10:55 PMflat-journalist-57447
09/17/2022, 10:53 AMsticky-country-73582
09/17/2022, 4:47 PMDeployment
and its Stage
using the stage_name
argument of the deployment resource. Now I want to do lookup for the stage and add access logging to it. How can I get the stage resource from this setup, i.e., what would be the id
in the get
method for Stage
lookup in https://www.pulumi.com/registry/packages/aws/api-docs/apigateway/stage/#look-up?calm-horse-33012
09/17/2022, 6:21 PMawsx.apigateway.API
.
1. You can't set a role, which is required, for integrations, I get this error: "Unable to put integration on 'ANY' for resource at path '/integration': Role ARN must be specified for AWS integrations"
a. Looking at this example, it seems we should be able to set credentialsArn
?sparse-intern-71089
09/18/2022, 12:49 AMfast-island-38778
09/18/2022, 1:57 PMerror: performing HTTP request: Get "<https://api.pulumi.com/api/stacks/><my_org>/<my_app>/staging": x509: "iamlive CA" certificate is not trusted
any fixes would be appreciated!thankful-father-68341
09/18/2022, 2:39 PMbillowy-horse-79629
09/19/2022, 12:19 PMcache.t3.small
to cache.m5.large
.
The pulumi preview works great, then the pulumi update succeed but when looking in AWS console, the instancetype is still cache.t3.small
, and the replication instances aren’t in modifying state.
Very weird…
Thanks !early-keyboard-41388
09/19/2022, 4:56 PMlambda.Permission
for an Api Gateway call with stageVariables
, but getting an error in the function
name.
new aws.lambda.Permission(
'permission-resource,
{
action: 'lambda:InvokeFunction',
function: interpolate`arn:aws:lambda:${awsRegion}:${callerIdentityOutput.accountId}:function:${apiLambda.name}:\${stageVariables.GRAPHQL_ALIAS}`,
principal: '<http://apigateway.amazonaws.com|apigateway.amazonaws.com>',
sourceArn: interpolate`arn:aws:execute-api:${awsRegion}:${callerIdentityOutput.accountId}:${this.api.id}/*/${postMethod.httpMethod}${resource.path}`,
},
{ parent: postMethod },
);
The the addition of ${stageVariables.GRAPHQL_ALIAS}
is not working.
How is it done correctly?billowy-plastic-61471
09/20/2022, 10:35 AMnew aws.iam.AccessKey(
'test-access-key',
{ user: testIamUser.name }
)
And here’s the pulumi up
Output:
accessKey : {
id : "AKIA3U6R3XXXXX2UPF44"
secret: [secret]
}
How do I initially get that [secret]
value ❓
Thanksvictorious-church-57397
09/20/2022, 12:07 PMimport { ApplicationLoadBalancer } from '@pulumi/awsx/lb';
witty-vegetable-61961
09/20/2022, 4:08 PMambitious-daybreak-8631
09/21/2022, 6:00 AMconst metricAlarm = new aws.cloudwatch.MetricAlarm("mymetricalarm", {
comparisonOperator: "GreaterThanOrEqualToThreshold",
evaluationPeriods: 2,
metricName: "CPUUtilization",
namespace: "AWS/EC2",
period: 120,
statistic: "Average",
unit:"Percent",
threshold: 0.5,
alarmDescription: "This metric monitors ec2 cpu utilization"
});
few-mechanic-54967
09/22/2022, 2:19 AMsteep-lamp-20408
09/22/2022, 3:17 AMsticky-jordan-27156
09/23/2022, 8:14 AMlet _policy =
let args =
Iam.RolePolicyArgs (
Policy =
input
"""
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "arn:aws:logs:*:*:*"
}]
}
""",
Role = io lambdaRole.Id
)
Iam.RolePolicy ($"{loweredProjectName}-log-policy", args)
Leads to
aws:iam:RolePolicy (autograph-log-policy):
error: aws:iam/rolePolicy:RolePolicy resource 'project-log-policy' has a problem: "policy" contains an invalid JSON policy. Examine values at 'RolePolicy.Policy'.
I'm not sure why. Any ideas?crooked-appointment-9302
09/24/2022, 6:04 PMus-east-1
. The table here:
https://www.pulumi.com/registry/packages/aws/api-docs/cloudfront/distribution/#distributionviewercertificate
…says that it’s necessary if you are setting acm_certificate_arn
, but I’m setting iam_certificate_id
where it doesn’t state that requirement. Once I figured that out, I’m drawing a blank on how to get this done. I read this article here, which made it seem simple:
https://www.pulumi.com/blog/deploy-to-multiple-regions/
So I just create a region and pass it in to the resources I want to create in the other region, right? Well when I do that, I get:
error: unable to validate AWS credentials. Make sure you have:
• Set your AWS region, e.g. `pulumi config set aws:region us-west-2`
pulumi refresh
works fine, though, so it’s not a credentials issue as far as I can see.
I’ve tried removing the region from the Pulumi config, from the AWS config, I’ve tried manually passing in the primary region to all my other resources… no matter what I do, as soon as I try to use the approach from the article, it stops me from getting anywhere at all. What am I missing?
Edit: Figured it out. When you create a provider with Provider('foo', region='us-east-1')
, it discards any other configuration. So if you are using a non-default AWS profile, then you end up using a completely different profile and you need to use Provider('foo', region='us-east-1', profile='bar')
instead.rhythmic-fireman-45324
09/25/2022, 3:22 AMReferenceError: You are trying to `import` a file after the Jest environment has been torn down
at getStackResource (node_modules/@pulumi/resource.ts:1116:36)
at new Resource (node_modules/@pulumi/resource.ts:300:39)
at new CustomResource (node_modules/@pulumi/resource.ts:780:9)
at new Role (node_modules/@pulumi/iam/role.ts:306:9)
at Object.construct (node_modules/@pulumi/iam/index.ts:111:24)
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down.
at node_modules/@pulumi/runtime/closure/createClosure.ts:417:48
at node_modules/@pulumi/pulumi/runtime/closure/createClosure.js:21:71
at Object.<anonymous>.__awaiter (node_modules/@pulumi/pulumi/runtime/closure/createClosure.js:17:12)
TypeError: stack.getStackResource is not a function
// Lambda
export const func = new aws.lambda.CallbackFunction("test", {
callback: async (ev, ctx) => {
return {
statusCode: 200,
body: `Hello, world!`,
};
},
});
rhythmic-fireman-45324
09/25/2022, 6:41 AMcreateClosure.js
. I moved this line outside the function to the top of the module, and it works now.
However I'm wondering what's a better solution?microscopic-painting-1312
09/26/2022, 6:33 PMsteep-lamp-20408
09/27/2022, 6:17 AMfrom pulumi_awsx import ec2
vpc = ec2.Vpc(resource_name="my-vpc")
print(vpc.id)
... outputs None
.
Any idea?few-mechanic-54967
09/27/2022, 7:22 AMglamorous-egg-43736
09/27/2022, 2:21 PMboundless-tomato-68419
09/27/2022, 6:08 PMchilly-magazine-6129
09/27/2022, 7:36 PMplain-arm-32800
09/28/2022, 10:23 AMplain-arm-32800
09/28/2022, 10:23 AMlittle-cartoon-10569
09/28/2022, 7:45 PMplain-arm-32800
09/29/2022, 9:05 AMlittle-cartoon-10569
09/29/2022, 7:03 PM