damp-school-17708
05/21/2021, 12:59 PMtest-lambda-${env}
, cron(* * * ? * *)
, (e) => {
JSON.stringify(e)
})
tall-beard-99429
05/21/2021, 3:21 PMerror creating Route53 Hosted Zone: InvalidDomainName: Primary-06bb170 is reserved by AWS!
any ideas how I can get around this?prehistoric-kite-30979
05/21/2021, 5:30 PMawsx.vpc
library (on refresh) not to override the subnet tags created by awsx.eks
?miniature-potato-84713
05/22/2021, 8:29 PMpulumi destroy
the stack, I receive an error that **deleting failed**
because
Diagnostics:
aws:cloudfront:Distribution (cdn):
error: deleting urn:pulumi:website-dev::website::aws:cloudfront/distribution:Distribution::cdn: CloudFront Distribution ED…W9 cannot be deleted: PreconditionFailed: The request failed because it didn't meet the preconditions in one or more request-header fields.
status code: 412, request id: 9180b51d-17da-4291-9399-38784fcf2f65
Before attempting to destroy, I changed all protect resource options (for all resources, not just the Distribution) to false
, yet still the error occurs.
Question: where can I find more information about the mentioned preconditions, and what does the request id refer to (is that a Pūlumi request id or an AWS request id)?little-cartoon-10569
05/23/2021, 10:45 PMgreen-knife-34770
05/24/2021, 4:07 PMpurple-appointment-84502
05/25/2021, 4:48 AMbroad-eve-12764
05/25/2021, 5:45 PMdeploymentCircuitBreaker
config when creating an awsx.ecs.FargateService
?little-market-63455
05/26/2021, 12:31 PMshy-waiter-84958
05/26/2021, 6:34 PMmodern-nest-74116
05/27/2021, 3:13 AMbitter-application-91815
05/27/2021, 8:44 AMbitter-application-91815
05/27/2021, 8:44 AMbitter-application-91815
05/27/2021, 8:45 AMbitter-application-91815
05/27/2021, 8:46 AMbillowy-nail-26074
05/27/2021, 1:03 PMAll attributes must be indexed.
error, similar to this report: https://github.com/pulumi/pulumi/issues/6690
Does anyone have a workaround for this bug? Or is it simply impossible to import DynamoDB tables into Pulumi?cold-yacht-45876
05/28/2021, 12:56 PMpurple-orange-91853
05/28/2021, 9:18 PMTurns out I was missing one : in the arn string causing the policy to render bad. Updated the Resource below to Resource: "arn:aws:iam::" + await accountId + ":user/${aws:username}" and all is well.
I am trying to write a AWS Self Manage policy and I'm stuck on getting the policy to work with aws internal variables such as ${aws:username}
when inside the JSON policy document. I have tried the terraform way of replacing the $
with an &
, but that does not work either. If I replace the Resource string in the policy document with "*"
it works as expected. I have also tried escaping the $
and {}
with a`\` in the code to no avail. Code block in question:
export const IAMSelfManagePolicy = async () => {
const current = aws.getCallerIdentity({ async: true });
const accountId = current.then(current => current.accountId);
const IAMSelfManagePolicy = new aws.iam.Policy("IAMSelfManagePolicy", {
name: "IAMSelfManagePolicy",
path: "/",
description: "Allow users to Self Manage their own credentials",
policy: JSON.stringify({
Version: "2012-10-17",
Statement: [
{
Sid: "AllowUserToChangePersonalOptions",
Effect: "Allow",
Action: [
"iam:*AccessKey*",
"iam:*SSHPublicKey*",
"iam:*LoginProfile",
"iam:ChangePassword"
],
Resource: "arn:aws:iam:" + await accountId + ":user/${aws:username}"
}
]
}),
});
}
curved-pharmacist-41509
05/31/2021, 3:14 AMconst role = new Role('role')
const myLambda = new Lambda('lambda', { executionRole: role })
const policy = new Policy('policy', {})
new RolePolicyAttachment('rpa', { role, policy })
Will the lambda update be done after the policy update?curved-pharmacist-41509
05/31/2021, 3:15 AMconst role = new Role('role')
const policy = new Policy('policy', {})
const rpa = new RolePolicyAttachment('rpa', { role, policy })
const myLambda = new Lambda('lambda', { executionRole: role }, { dependsOn: [rpa] })
elegant-pager-5412
05/31/2021, 9:11 AMpulumi up
?tall-truck-58456
06/01/2021, 12:16 PMawsx.ecs.Image.fromPath
how can I pass environment variables to the docker build command?
2. Is it possible to map EFS volume to the docker container for persistency using Pulumi?
This is my current scripts (following the Fargate tutorial)
import * as awsx from '@pulumi/awsx';
import * as pulumi from '@pulumi/pulumi';
const listener = new awsx.elasticloadbalancingv2.NetworkListener('example', { port: 443 });
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const service = new awsx.ecs.FargateService('example', {
taskDefinitionArgs: {
containers: {
example: {
image: awsx.ecs.Image.fromPath('example', '/Source/example'),
memory: 2048,
portMappings: [listener],
environment: [
{
name: 'ENV',
value: 'CLOUD',
},
],
},
},
},
});
export const frontendURL = pulumi.interpolate`http://${listener.endpoint.hostname}/`;
little-market-63455
06/01/2021, 2:08 PMgetPolicyDocument()
is almost not recommended.
All the properties on it take literal string
and not Input<string>
so if I want to interpolate other resource ARNs that I have created into the policy document, I would need
to apply()
and all
all these resources?
Am I getting this right? What's the reason it is designed to take string
instead of Input<string>
for its properties?rhythmic-actor-14991
06/02/2021, 3:53 AMrhythmic-actor-14991
06/02/2021, 3:54 AMelegant-pager-5412
06/03/2021, 5:00 AMbreezy-butcher-78604
06/03/2021, 5:37 AMelegant-pager-5412
06/03/2021, 6:05 AMaws:lambda/function:Function resource 'DEV-Lambda' has a problem: Computed attributes cannot be set: Computed attributes cannot be set, but a value was set for "vpc_config.0.vpc_id".. Examine values at 'Function.VpcConfig.VpcId'
elegant-pager-5412
06/03/2021, 11:26 AMComputed attributes cannot be set, but a value was set for "vpc_config.0.vpc_id".. Examine values at 'Function.VpcConfig.VpcId'
My configuration is very simple (doesn’t work even if I hardcode string IDS for everything):
vpcConfig: {
vpcId: vpc.id,
subnetIds: vpc.publicSubnetIds,
securityGroupIds: ['sg-a123123123'],
}
square-dress-80180
06/03/2021, 11:04 PMpulumi destroy
an rds instance and related subnet group ran into a problem where it seemed like pulumi thought it had stopped the rds instance, but actually hadn’t. So was receiving an error like this:
InvalidDBSubnetGroupStateFault: Cannot delete the subnet group 'cookie-db-sng-9fd6b64' because at least one database instance: cookie-db-rds05a1a02 is still using it.
So, stopped and deleted the rds instance manually since it was no longer “in” pulumi state from what I could tell. Tried to pulumi refresh
and pulumi destroy
again but no luck. I have been able to use pulumi destroy
to successfully delete the infra resources - internet gateway, subnets, vpc. But still the subnet group insists there is an rds instance still up and it is in use.
Any ideas on how to proceed?square-dress-80180
06/03/2021, 11:04 PMpulumi destroy
an rds instance and related subnet group ran into a problem where it seemed like pulumi thought it had stopped the rds instance, but actually hadn’t. So was receiving an error like this:
InvalidDBSubnetGroupStateFault: Cannot delete the subnet group 'cookie-db-sng-9fd6b64' because at least one database instance: cookie-db-rds05a1a02 is still using it.
So, stopped and deleted the rds instance manually since it was no longer “in” pulumi state from what I could tell. Tried to pulumi refresh
and pulumi destroy
again but no luck. I have been able to use pulumi destroy
to successfully delete the infra resources - internet gateway, subnets, vpc. But still the subnet group insists there is an rds instance still up and it is in use.
Any ideas on how to proceed?pulumi state delete
the resource urn for the subnet group that comes directly with the error message above, I get the following: no such resource exists in current state
little-cartoon-10569
06/03/2021, 11:31 PMsquare-dress-80180
06/07/2021, 4:29 PMstate
or aws state
that is the referenced state in InvalidDBSubnetGroupStateFault
.pulumi destroy
cmd worked fine.little-cartoon-10569
06/07/2021, 8:56 PMsquare-dress-80180
06/22/2021, 3:39 PM