orange-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)
wet-noon-14291
06/11/2020, 10:48 AMCan I have one project that does the build image and also deploys based on an input flag when running, or should I have one project for package the app and one for deploy?pulumi up
average-receptionist-65239
06/11/2020, 11:20 AM-import * as kx from "@pulumi/kubernetesx";
It's a change to my index.ts
. Has anyone else experienced this kind of thing?
Something similar happened a couple of days ago when I reordered my imports but I didn't stop to investigate.white-airport-48392
06/11/2020, 2:58 PMconst service = new awsx.ecs.EC2Service(name, {
name: `${name}-${utils.resolveStack()}`,
cluster: cluster,
subnets: ["xxxxx"],
taskDefinitionArgs: {
networkMode: "bridge",
taskRole: ecsConfig["taskRole"],
logGroup: null,
executionRole: ecsConfig["executionRole"],
containers: {
test: {
image: "xxxxx",
cpu: 1024,
memory: 1024,
portMappings: [listener]
}
}
},
desiredCount: 0
});
The above config creates the Service with a loadbalancer/target group that is configured over port 8080 , this forces a new target to be registered to the target group over 8080 only ,
But in my case I want the targets to register over ephemeral ports
If I want multiple docker containers to run on the same container instance , I need dynamic mapping which is configured via
portMappings:[
{
hostPort:0,
containerPort:8080
}]
If I do the above , the Service is created without a load balancer ,
Is there a way to get this to work per
https://aws.amazon.com/premiumsupport/knowledge-center/dynamic-port-mapping-ecs/
Any help is appreciated πbitter-zebra-93800
06/11/2020, 7:33 PMsparse-state-34229
06/11/2020, 7:41 PMgentle-diamond-70147
06/11/2020, 7:50 PMthankful-laptop-55220
06/11/2020, 10:12 PM__pulumiOutput
and similar as values for g
. preview:
pulumi:pulumi:Stack gcso-k8-dev
+ ββ aws:ec2:LaunchTemplate __pulumiOutput create
+ ββ aws:ec2:LaunchTemplate promise create
+ ββ aws:ec2:LaunchTemplate toString create
+ ββ aws:ec2:LaunchTemplate toJSON create
+ ββ aws:ec2:LaunchTemplate allResources create
+ ββ aws:ec2:LaunchTemplate resources create
+ ββ aws:ec2:LaunchTemplate isSecret create
+ ββ aws:ec2:LaunchTemplate isKnown create
what am i not grasping?thankful-laptop-55220
06/11/2020, 10:17 PMup
operation? granted that leaves preview rather useless at predicting what resources would be CRUD'ed, but is it possible?millions-judge-24978
06/11/2020, 10:25 PMgifted-city-99717
06/11/2020, 11:05 PMproject_root
βββ Pulumi.yaml
βββ README.md
βββ elasticsearch/
βββ fargate/
βββ go.mod
βββ go.sum
βββ influxdb/
βββ main.go
βββ main_test.go
βββ s3sink/
βββ Pulumi.sink-dev.yaml
βββ Pulumi.sink-stage.yaml
βββ Pulumi.sink-prod.yaml
βββ handler/
βββ handler.zip
βββ policies.go
βββ sink_bucket.go
βββ sink_bucket_test.go
When I try running pulumi up
I get an error saying config hasnβt been set. I was wondering if anyone has any pointers (aside from moving the stack yaml files to the same level as the project)β¦little-dentist-8150
06/12/2020, 1:59 AMbusy-honey-73811
06/12/2020, 12:28 PMmillions-furniture-75402
06/12/2020, 12:57 PMacoustic-rose-89683
06/12/2020, 2:07 PMcrooked-window-31802
06/12/2020, 2:13 PMcrooked-window-31802
06/12/2020, 2:13 PM