important-sandwich-62391
07/07/2021, 9:03 PMflaky-school-82490
07/08/2021, 7:27 AMpulumi import
command, where can I find the type-token
for a given resource?
https://www.pulumi.com/docs/reference/cli/pulumi_import/
Also is it possible to import a resource that the provider does not fully cover?adventurous-camera-87788
07/08/2021, 6:48 PMcache.Redis (v20201201)
& I am trying to get the following statement to produce a string:
const REDIS_CONNECTION_STRING = pulumi.interpolate `rediss://:${redis.accessKeys.primaryKey}@${redis.hostName}${redis.sslPort}`;
I am getting the following error:
"Calling [toString] on an [Output<T>] is not supported.\n\nTo get the value of an Output<T> as an Output<string> consider either:\n1: o.apply(v => `prefix${v}suffix`)\n2: pulumi.interpolate `prefix${v}suffix`\n\nSee <https://pulumi.io/help/outputs> for more details.\nThis function may throw in a future version of @pulumi/pulumi."
I’ve tried doing this with pulumi.apply
as well & had no luck. Can someone please point me in the right direction?magnificent-jordan-5838
07/08/2021, 7:54 PMgreen-intern-27665
07/08/2021, 8:38 PMapply
calls any idea how to solve this?
My goal is to have a key/value array of strings with all my varsnumerous-portugal-47563
07/08/2021, 11:30 PMmelodic-family-23496
07/09/2021, 3:23 AMbumpy-room-43904
07/09/2021, 3:27 AMbumpy-room-43904
07/09/2021, 3:33 AM"""An AWS Python Pulumi program"""
import pulumi
from pulumi_aws import s3
# Create an AWS resource (S3 Bucket)
bucket = s3.Bucket('my-bucket')
# Export the name of the bucket
pulumi.export('bucket_name', bucket.id)
bucketObject = s3.BucketObject(
'index.html',
acl='public-read',
content_type='text/html',
bucket=bucket,
source=pulumi.FileAsset('index.html'),
)
pulumi.export('bucket_endpoint', pulumi.Output.concat('http://', bucket.website_endpoint))
It must be me...pulumi seems great thus far despite my error. Any hints for this?many-yak-61188
07/09/2021, 1:21 PMgray-belgium-81846
07/09/2021, 4:17 PMaws-ts-hello-fargate
example on an M1 mac. When running pulumi up
it never completes — the ECS service never gets healthy and is stuck in a death loop. This is due to building the docker container by default for arm64 arch instead of linux/amd64. I was able to modify the sample to specify the architecture in the docker build options and make progress.
However, I’m concerned about the behavior when attempting to deploy a bad container. I had to break out out of pulumi up
run pulumi stack export
and clean up the ECS service from pending operations, then re-import using pulumi stack import
. Even then when I ran pulumi destroy
I had to manually cleanup the ECS cluster using the console.
Is this expected behavior when a bad image is deployed?rough-hydrogen-27449
07/09/2021, 8:28 PMpulumi_confluent
and pulumi_kafka
providers. My initial structure was to have two separate projects, one for the Confluent Cloud infrastructure confluent-cloud-infra
and one for the main application main-infra
. My plan is to manage the Confluent Cloud resources for each of my stacks in the confluent-cloud-infra
project and pulumi.export
data like this:
def main() -> None:
confluent = Confluent(name=f"{pulumi.get_stack()}_Confluent")
pulumi.export(
"confluent",
{
"bootstrap_servers": confluent.kafka_cluster.bootstrap_servers,
"pulumi_api_key": confluent.pulumi_api_key,
"service_credentials": confluent.service_credentials,
}
)
Then, I plan to consume these data via a StackReference
in my main-infra
project and create all my application-specifc resources (topics, ACLs) with the pulumi_kafka
provider.
The issue I've run into, and the reason for my question, is that the pulumi_kafka
provider expects e.g. the bootstrap_servers
to be passed in as a configuration parameter (https://github.com/pulumi/pulumi-kafka/blob/master/README.md#configuration), and as far as I can tell I can't mutate the pulumi.Config
object.
Is there a way to dynamically update my configuration at runtime? Or is it a hard constraint that I must set these values in my configuration file?rough-hydrogen-27449
07/09/2021, 9:20 PMpulumi_kafka.Provider
and pass that in? I see a similar approach in the example here: https://www.pulumi.com/docs/intro/concepts/stack/#stackreferencesred-scooter-62880
07/10/2021, 12:13 AMtall-apartment-87556
07/10/2021, 3:17 AMmillions-ability-32682
07/10/2021, 9:41 AM$ tree -I node_modules $(pwd)
/workspaces/tmnf-do
├── package.json
├── package-lock.json
├── Pulumi.tmnf-server.yaml
├── Pulumi.vm.yaml
├── Pulumi.yaml
├── stacks
│ ├── tmnf-server
│ │ └── index.ts
│ └── vm
│ ├── index.ts
│ └── userdata.sh
└── tsconfig.json
Then I changed the main
setting of the two stacks to point to the stack directory:
$ tail -n +1 Pulumi.*.yaml
==> Pulumi.tmnf-server.yaml <==
main: stacks/tmnf-server
==> Pulumi.vm.yaml <==
main: stacks/vm
config:
digitalocean:token:
secure: [redacted]
But when I run pulumi up --stack vm
I get the following warning:
Diagnostics:
pulumi:pulumi:Stack (tmnf-do-vm):
We failed to locate the entry point for your program: /workspaces/tmnf-do
Here's what we think went wrong:
* Your program's 'main' file (/workspaces/tmnf-do/index.js) does not exist.
Which leads me to think that pulumi is still looking for the program in the project directory, disregarding the main
setting from stack config files. My question is: should a setup like this be possible, and should it even be possible to override main
per stack like I am trying to do?red-scooter-62880
07/10/2021, 12:46 PMshy-beach-41444
07/12/2021, 7:58 AM{
"resources": [
{
"type": "aws:lambda/function:Function",
"name": "lambda-slack-notifier",
"id": "lambda-notifier",
"handler": "index.handler",
"runtime": "nodejs"
}
]
}
fresh-restaurant-12335
07/12/2021, 5:14 PMhappy-angle-19851
07/12/2021, 6:43 PMaloof-jelly-80665
07/12/2021, 7:51 PMgray-belgium-81846
07/12/2021, 9:18 PMprehistoric-london-9917
07/12/2021, 11:45 PMexport const privateSubnetIds = vpc.privateSubnetIds;
I have another stack that reads the first stack’s outputs:
const privateSubnetIds = vpcStack.requireOutput("privateSubnetIds");
The requireOutput
function returns an Output<any>
type.
What’s the proper way to cast this back to something like a string[]
?
I searched Slack and found someone else who asked a similar question, but it remained unanswered.
Any thoughts?many-yak-61188
07/13/2021, 2:13 PMurl
. I decided to switch to using the service. My current state is as below
➜ p-gar git:(main) pulumi stack
Current stack is accrue-money/ci-cd:
Owner: accrue-money
Last update time unknown
Pulumi version: ?
Current stack resources (0):
No resources currently in this stack
More information at: <https://app.pulumi.com/accrue-money/p-gar/ci-cd>
Use `pulumi stack select` to change stack; `pulumi stack ls` lists known ones
when I set config settings using pulumi config
as below
pulumi config set GITHUB_ACTIONS_RUNNER_CONTEXT "<https://github.com/orgs/accrue-money/>"
I expected the config to show up in the service instead of a file Pulumi.ci-cd.yaml
being present in the repository. My expectation being incorrect, what is the correct way to distribute configuration setting to other devs? Does each developer need to run the pulumi config
commands after a git clone
? Should I commit the file Pulumi.ci-cd.yaml
? Over all a little confused about the purpose of stack specific configuration and the need to distribute it to others, what is the best way to do this?calm-gpu-56173
07/13/2021, 11:50 PMmillions-ability-32682
07/14/2021, 6:52 AM$ tree -I node_modules $(pwd)
/workspaces/tmnf-do
├── package.json
├── package-lock.json
├── Pulumi.tmnf-server.yaml
├── Pulumi.vm.yaml
├── Pulumi.yaml
├── stacks
│ ├── tmnf-server
│ │ └── index.ts
│ └── vm
│ ├── index.ts
│ └── userdata.sh
└── tsconfig.json
Then I changed the main
setting of the two stacks to point to the stack directory:
$ tail -n +1 Pulumi.*.yaml
==> Pulumi.tmnf-server.yaml <==
main: stacks/tmnf-server
==> Pulumi.vm.yaml <==
main: stacks/vm
config:
digitalocean:token:
secure: [redacted]
But when I run pulumi up --stack vm
I get the following warning:
Diagnostics:
pulumi:pulumi:Stack (tmnf-do-vm):
We failed to locate the entry point for your program: /workspaces/tmnf-do
Here's what we think went wrong:
* Your program's 'main' file (/workspaces/tmnf-do/index.js) does not exist.
Which leads me to think that pulumi is still looking for the program in the project directory, disregarding the main
setting from stack config files. My question is: should a setup like this be possible, and should it even be possible to override main
per stack like I am trying to do?hallowed-ice-8403
07/14/2021, 8:03 AMcalm-gpu-56173
07/14/2021, 1:50 PMmany-yak-61188
07/14/2021, 5:10 PMAWS_ACCESS_KEY_ID
& AWS_SECRET_ACCESS_KEY
. On the machine I tried some aws cli commands and they work perfectly. QQ: Is there a way use pulumi/actions without configuring credentials, because the host that is the runner has role based permissions assigned to it?crooked-parrot-53351
07/14/2021, 5:39 PMApnsCredential
(https://www.pulumi.com/docs/reference/pkg/azure-native/notificationhubs/notificationhub/#apnscredential) with prop apnsCertificate
is of type string
. The p12 file provided by Apple is a binary file; is there a text encoding that Pulumi is expecting when setting the value?crooked-parrot-53351
07/14/2021, 5:39 PMApnsCredential
(https://www.pulumi.com/docs/reference/pkg/azure-native/notificationhubs/notificationhub/#apnscredential) with prop apnsCertificate
is of type string
. The p12 file provided by Apple is a binary file; is there a text encoding that Pulumi is expecting when setting the value?base64
encoding. Does this seem right?