miniature-leather-70472
06/07/2020, 6:30 PMvictorious-xylophone-55816
06/07/2020, 7:46 PMstaging/prod
environments, but I can't seem to find any content online of people using it this way.
Rather than use docker-compose
for local, and maintaining that setup (with all the env vars etc) it seems like a better flow to have everything inside of Pulumi, and just toggle the target based on environment.
But I couldn't seem to figure out how to get Pulumi to force a re-deploy locally of a Docker container from the stack
, so I think maybe this isn't an intended use?
Any experience/input would be greatly appreciated 🙏helpful-advantage-49286
06/07/2020, 7:46 PMplain-park-4925
06/07/2020, 8:32 PMpulumi up
it throws a stack trace and says "NameError: name 'ResourceOptions' is not defined".. Can anyone point me in the right direction? Here's a snippet.
import json
import mimetypes
import os
from pulumi import export, FileAsset
from pulumi_aws import s3, Provider
provider = Provider("provider", region="us-east-1", endpoints="<http://localhost:4566>")
web_bucket = s3.Bucket('jon-pulumi-localstack-bucket', website={"index_document": "index.html"}, opts=ResourceOptions(provider=provider))
little-cartoon-10569
06/07/2020, 11:37 PMfamous-jelly-72366
06/08/2020, 7:38 AMrhythmic-finland-36256
06/08/2020, 5:13 PMicy-jordan-58549
06/08/2020, 8:27 PMPulumi has deep support for cloud native technologies, like Kubernetes, and supports advanced deployment scenarios that cannot be expressed with Terraform. This includes Prometheus-based canaries, automatic Envoy sidecar injection, and more. Pulumi is a proud member of the Cloud Native Computing Foundation (CNCF).
why you can’t do it using terraform?
Thankswide-boots-39023
06/09/2020, 12:59 AMconst file = new aws.s3.BucketObject("filename", {...});
and later in a lambda access it using file.id.get()
.
is it possible to create an array of resources and access them from a lambda too? when i try the naive way of pushing resources into an array it seems to turn up empty
thank youaverage-receptionist-65239
06/09/2020, 5:31 AMtemplate|url
parameter refered to in the pulumi up
man page?
pulumi up [template|url] [flags]
cold-iron-6673
06/09/2020, 7:23 AMfaint-accountant-59646
06/09/2020, 8:11 AMfast-ice-1848
06/09/2020, 8:37 AMAddon kubeDashboard is not supported in this cloud env
. Disable this addon doesn't work. Is there any about this?gray-helicopter-10230
06/09/2020, 9:36 AMmillions-furniture-75402
06/09/2020, 3:20 PMorange-tailor-85423
06/09/2020, 8:38 PMclever-plumber-29709
06/09/2020, 9:20 PMaverage-receptionist-65239
06/09/2020, 10:33 PMaverage-receptionist-65239
06/09/2020, 10:42 PMbranch=staging-foo
pulumi --stack=${branch} stack select || pulumi --stack=${branch} stack init
I couldn't find a better way of doing that. Did I miss something?average-receptionist-65239
06/10/2020, 6:18 AMimport
property of the 3rd argument to the constructor (which is a CustomResourceOptions
).
However, I get the TypeScript error:
: error TS2345: Argument of type '{ import: string; }' is not assignable to parameter of type 'ComponentResourceOptions'.
Object literal may only specify known properties, and 'import' does not exist in type 'ComponentResourceOptions'.
Seems that the 3rd argument is a ComponentResourceOptions
which doesn't have the import
property.
Any idea what I'm doing wrong here?boundless-airport-99052
06/10/2020, 7:36 AMVirtualMachine
) is now deprecated in favor of `azurerm_linux_virtual_machine`& azurerm_windows_virtual_machine
(see [pulumi VirtualMachine disclamer](https://www.pulumi.com/docs/reference/pkg/azure/compute/virtualmachine/#disclaimers).
The problem is the new LinuxVirtualMachine
or WindowsVirtualMachine
does not support embedded data disk attachement which means that we can not use cloud-init
to initialize a VM and mount/configure its datadisk. I opened an issue on terraform 👉 https://github.com/terraform-providers/terraform-provider-azurerm/issues/6074. If you can look at it and vote for it, (if you agree of course), it will be great 👍👍👍average-receptionist-65239
06/10/2020, 8:29 AMwarning: inputs to import do not match the existing resource; importing this resource will failAFAICS, the secret I'm importing is the same as the Kubernetes secret. The difference is listed as
+ data: "[secret]"Any ideas?
able-beard-29160
06/10/2020, 12:46 PMpulumi stack ls
?nice-airport-15607
06/10/2020, 5:46 PM/**
* The endpoint to send data to, the contents will vary with the protocol. (see below for more information)
*/
readonly endpoint: pulumi.Input<string>;
but idk what that means ☝️, any ideas?limited-carpenter-34991
06/10/2020, 6:40 PMicy-jordan-58549
06/10/2020, 7:54 PMOutput (python)
,
azure.storage.Container("container")
with
pulumi.export('source', container.name.apply(lambda n: n))
gives the output <pulumi.output.Output object at 0x1094e2a50>
but for other resources it looks like it helps to use apply lambda.full-dress-10026
06/10/2020, 9:23 PMrefresh
on my stack with an aws profile set in the config,
config:
aws:region: us-west-2
aws:profile: my-profile
I will get these error messages and preview failure.
warning: configured Kubernetes cluster is unreachable: unable to load schema information from the API server: the server has asked for the client to provide credentials
If I run pulumi up
on the same stack, I do not get that error message and the update is successful. Any idea what is going on?rich-napkin-40911
06/11/2020, 4:47 AMimport * as pulumi from '@pulumi/pulumi';
import * as azure from '@pulumi/azure';
export = async () => {
const account = await azure.storage.getAccount({
name: 'myaccount',
});
const names = ['container1', 'container2', 'container3'];
let counter = 1;
let containers: azure.storage.Container[] = [];
names.forEach(n =>
containers.push(
new azure.storage.Container(`container-${counter++}`, {
name: n,
storageAccountName: account.name,
}),
),
);
counter = 1;
let blobs: azure.storage.Blob[] = [];
containers.forEach(c =>
blobs.push(
new azure.storage.Blob(`blob-${counter++}`, {
name: pulumi.interpolate`${c.name}blob`,
storageAccountName: account.name,
storageContainerName: c.name.apply(n => n),
sourceContent: pulumi.interpolate`This is a blob in ${c.name}`,
type: 'Block',
}),
),
);
};
First question: I want to be sure of is to make sure, say, blob1
goes into container1
etc. Is there any way to make sure that happens?
And also, another thing is let's say for some reason, I want to remove the middle name container2
from names
, then resources will be "replaced" to become 2 (eg., container3
would be rename
In Terraform, count
and for_each
have different behaviors:
• count
would have the same effect; if you remove something from the middle, it will replace resources
• for_each
however would only remove that resource and not touch the other ones
Is there a way to achieve the same behavior in here? I have a hunch that using counter
here is messing things up, is there a better way to do it?wet-noon-14291
06/11/2020, 7:46 AMpulumi up
the doc says I can use the -c
flag, but what is the format of the stringArray
it expects?famous-jelly-72366
06/11/2020, 8:45 AMresource 'urn:pulumi:main::tms-pulumi::pulumi:pulumi:Stack::tms-pulumi-ci' is from a different stack (main != ci)