freezing-daybreak-42018
03/03/2023, 7:31 PMfreezing-daybreak-42018
03/03/2023, 7:31 PMfreezing-daybreak-42018
03/03/2023, 7:31 PMfreezing-daybreak-42018
03/03/2023, 7:31 PMfreezing-daybreak-42018
03/03/2023, 7:31 PMfreezing-daybreak-42018
03/03/2023, 7:33 PMrich-motorcycle-71684
03/16/2023, 7:41 AMses_DomainIdentityVerification:
type: aws:ses:DomainIdentityVerification
properties:
domain:
fn::invoke:
function: str:trimPrefix
arguments:
# arguments dictionary
prefix: "production." # the prefix to trim
string: "${ses_DomainIdentity.id}" # the string from which to trim it
...
Error: aws:ses/domainIdentityVerification:DomainIdentityVerification is not assignable from {domain: str:index:trimPrefixResult}
rich-motorcycle-71684
03/27/2023, 12:54 AMPulumi.develop.yaml
file
config:
aws:profile: 028111111111_AWSAdministratorAccess
aws:region: ap-southeast-2
myprojectname:aws_account_id: "028111111111"
myprojectname:dns_domain: "redacted"
myprojectname:aws_route53_zoneid: "redacted"
When I attempt to use this value aws_account_id
in the code, it strips the zero. The stripping doesn't happen to the aws:profile
. Perhaps because it contains some alpha characters too, or perhaps because the aws provider handles the variable differently.
This is where I tried to use it (in an IAM policy)
# Allow to send emails with SES.
- Action:
- ses:SendEmail
Effect: Allow
Resource: "*" # "arn:aws:ses:${aws:region}:${aws_account_id}:identity/${ses_DomainIdentity.domain}" # can't use this due to bug with yaml stripping leading 0 from aws_account_id
brash-gigabyte-81569
04/18/2023, 3:23 PMconfig:
aws:assumeRole:
roleArn: xxx
aws:region: us-east-1
gifted-cat-49297
04/19/2023, 7:27 AMgifted-cat-49297
04/20/2023, 11:28 AM* unexpected configuration type 'map[string]interface {}': valid types are string, List<string>, number, List<number>, integer, List<integer>, boolean, List<number>
for
config:
cloud_run:resources:
ingress: "all"
gifted-cat-49297
04/26/2023, 6:29 PMcloud_run:APP_TRACE_SAMPLING_RATE: "0.001"
but preview its getting 0. I tries to set 0.1
it give 0, tried "0.1"
also 0 but "a0.01"
five a0.01
~ template: {
~ spec: {
~ containers: [
~ [0]: {
~ envs: [
~ [1]: {
+ name : "APP_TRACE_SAMPLING_RATE"
+ value: 0
}
]
}
]
}
}
millions-furniture-75402
05/05/2023, 12:12 PMmillions-furniture-75402
05/05/2023, 12:59 PMmillions-furniture-75402
05/05/2023, 2:06 PMmillions-furniture-75402
05/05/2023, 3:01 PMconfig:
apiAccessKeyWhitelist:
type: array
items:
type: string
The errors weren't super helpful:
Pulumi.yaml': 8 errors occurred:
* #/config/apiAccessKeyWhitelist: oneOf failed
* #/config/apiAccessKeyWhitelist: expected string, but got object
* #/config/apiAccessKeyWhitelist: expected integer, but got object
* #/config/apiAccessKeyWhitelist: expected boolean, but got object
* #/config/apiAccessKeyWhitelist: expected array, but got object
* #/config/apiAccessKeyWhitelist: doesn't validate with '/$defs/configTypeDeclaration'
* #/config/apiAccessKeyWhitelist/items: doesn't validate with '/$defs/configItemsType'
* #/config/apiAccessKeyWhitelist/items: expected object, but got string
millions-furniture-75402
05/05/2023, 3:04 PMWe failed to locate the entry point for your program:
Here's what we think went wrong:
* Your program looks like it has a build script associated with it ('DESTFOLDER=dist/lambda-layer/nodejs && mkdir -p ${DESTFOLDER} && cp package.json package-lock.json ${DESTFOLDER} && npm install --prefix ${DESTFOLDER} --production --ignore-scripts && rm ${DESTFOLDER}/package.json ${DESTFOLDER}/package-lock.json && nest build').
but it is built...
ls dist/app |wc -l
15
millions-furniture-75402
05/05/2023, 3:08 PMmillions-furniture-75402
05/05/2023, 3:14 PMnodejs
still... but now I have the array issue againmillions-furniture-75402
05/05/2023, 3:32 PMmillions-furniture-75402
05/05/2023, 3:39 PMmillions-furniture-75402
05/05/2023, 4:09 PMmillions-furniture-75402
05/05/2023, 4:24 PMvariables:
vpc:
fn::invoke:
function: aws:ec2/getVpc:getVpc
arguments:
id: ${vpcId}
millions-furniture-75402
05/05/2023, 4:24 PMshared-vpc:
get: ${vpc}
millions-furniture-75402
05/05/2023, 4:40 PMechoing-dinner-19531
05/06/2023, 10:16 AMIs there any way to propagate tags to all resources using YAML?Currently no. There's no support for stack transforms, we've been thinking about maybe enabling that via an external policy but might also be worth supporting some simple transforms in yaml directly so feel free to raise a request.
How can I use Stack Reference with YAMLYes, the code you posted to the thread looks right to me but it does look like the docs pages is missing a section. Raised an issue for that https://github.com/pulumi/pulumi-hugo/issues/2798
Can I use logic and loops in YAML?No the design is intended to be for very simple uses cases, our thinking is if you need logic and loops you shouldn't be using YAML. There is an issue for this https://github.com/pulumi/pulumi-yaml/issues/191 but the current stand is either upgrade to a full language (which is what
pulumi convert
helps with) or use a templating system like CUE or Jinja.
Figuring out arrays in YAML was a huge pain in the ass.Structured config like arrays and objects is still being improved. As you've pointed out the errors aren't great because it's pretty much a raw dump of the schema validation, we have an issue tracking that at https://github.com/pulumi/pulumi/issues/11129.
My major blocker now is the array from configuration. Why is this so terrible?I think (and I haven't touched the yaml codebase for a bit) because yaml never had support for arrays or objects as config. The engine can handle them but YAML doesn't. I'm working on a new set of tests to cover all the language to makes sure they're consistent about their support for config values. Fixing this should fall out from that work.
This seems to successfully get the vpc, but how do make it a local resource?Not totally sure what your asking here given the code snippet? Do you mean how do you define a vpc resource for pulumi to create instead of get?
gifted-cat-49297
05/19/2023, 2:11 PMrich-motorcycle-71684
05/29/2023, 9:36 AMALLOWED_HOSTS
of my app. Therefore the LB thinks the target is unhealthy and pulumi times outrich-motorcycle-71684
05/30/2023, 3:58 AMsg_allowPostGresFromECS:
type: aws:ec2:SecurityGroup
properties:
description: Pulumi managed. Allow Postgres inbound traffic from ECS.
ingress:
- description: Postgres from ECS.
fromPort: 0
toPort: 5432
protocol: tcp
securityGroups:
- ${???????}
egress:
- fromPort: 0
toPort: 0
protocol: "-1"
cidrBlocks:
- 0.0.0.0/0
freezing-kitchen-80795
06/01/2023, 5:49 PM