ambitious-ram-5811
12/03/2019, 1:23 AMinputs
property of HttpFunction seems to be the ticket, but it's zero documented and I haven't found any examples that use itagreeable-australia-82656
12/03/2019, 5:42 PMelegant-dress-88912
12/03/2019, 6:29 PMSorry, could not create stack 'dev': secrets (code=PermissionDenied): rpc error: code = PermissionDenied desc = Permission 'cloudkms.cryptoKeyVersions.useToEncrypt' denied on resource 'projects/<proj>/locations/us-central1/keyRings/<keyring>/cryptoKeys/<key>' (or it may not exist).
I verified that access is OK, I can encrypt/decrypt with gcloud clielegant-dress-88912
12/03/2019, 6:43 PMelegant-dress-88912
12/03/2019, 6:48 PMglamorous-printer-66548
12/03/2019, 6:48 PMnew datadog.Dashboard('foo',
{ description: 'foo', layoutType: 'ordered', widgets: [], title: 'foo' },
{
import: '3abc-qix-gn5',
}
);`
Note that in this example the widgets part is under-specified - the to-be-imported resource has already many items under widgets
. Therefore when I do a preview, I get inputs to import do not match the existing resource; importing this resource will fail
which is kinda fine.
When I do the preview with diff I can actually see what parts in my config are missing. Ideally I'd like to copy the widgets section from the diff and simply copy & paste it into my pulumi (typescript) code, so that I don't have to create all the inputs code from scratch. However while the diff looks javascript-ish, it's missing commas and has all the -
and [arrayindex]
characters.
Now my question is: Is there a way I can get a more javascript-ish diff without all those extra characters so that I can simply use the diff as my starting point for the config? Or is there any other way to semi-manually generate pulumi code for existing resources to ease adoption?
Note I already tried pulumi preview --diff --json
but unfortunately the detailed diff is missing when I do so (unlike when running pulumi preview --diff
which shows the full diff but with all those extraneous diff characters.)quaint-garden-96746
12/03/2019, 8:34 PMtime pulumi --logtostderr -v=9 stack
I1203 22:28:22.700826 89424 backend.go:408] found username for access token
I1203 22:29:03.110095 89424 backend.go:408] found username for access token
Current stack is stage:
Owner: project_iac
Last updated: 7 hours ago (2019-12-03 15:03:51.875385 +0200 EET)
Pulumi version: v1.6.1
Current stack resources (123):
...
Current stack outputs (7):
...
real 0m40.506s
user 0m0.289s
sys 0m0.093s
the others commands like pulumi up slow as well
how can i debug what is the reason of the huge slow down ?steep-printer-55468
12/03/2019, 9:18 PMworried-engineer-33884
12/03/2019, 11:33 PMpulumi refresh
and then on the next pulumi up
I am getting this error:
Error: Cannot find module './servicequotas/index'
I don't have any servicequotas resources in my program. Where is this coming from?mammoth-psychiatrist-53448
12/03/2019, 11:57 PMrhythmic-hair-33677
12/04/2019, 2:13 AMplain-eye-9759
12/04/2019, 10:22 AMpulumi up
, which now makes the deployment take so long.
This is what my cluster looks like:
const k8sCluster = new azure.containerservice.KubernetesCluster(config.clusterName, {
resourceGroupName: resourceGroup.name,
location: resourceGroup.location,
name: config.clusterName,
agentPoolProfiles: [{
name: "nodepool1",
count: config.nodeCount,
vmSize: config.nodeSize,
osType: "Linux"
}],
dnsPrefix: `${pulumi.getStack()}-kube`,
servicePrincipal: {
clientId: app.applicationId,
clientSecret: spPassword
},
tags: {
environment: config.env,
},
}, { dependsOn: [app, adSpPassword] });
And here is pulumi up
in action:handsome-cat-98152
12/04/2019, 11:24 AMimport
of existing kuberenetes objects.
What I thought It does:
Now you can apply a new configuration over the very same kubernetes object
What it does:
It doesn't work, when there is a minor difference between the new and the existing configuration. Pulumi states that: warning: inputs to import do not match the existing resource; importing this resource will fail
and fails with
error: inputs to import do not match the existing resource
error: update failed
What am I doing wrong here?
I just want to update/reuse existing kubernetes ressourceshigh-jackal-29091
12/04/2019, 11:32 AMm5d.2xlarge
Amazon Linux 2 AMI (HVM), SSD Volume Type
has by default 1x300GB SSD disk attached. When I create such instance using new aws.ec2.Instance
everything is fine and ec2 instance is being provisioned with /dev/nvme1n1 296G
volume. However, when I use exactly the same instance size and AMI (ami-0cc293023f983ed53), but create it in autoscaling group new awsx.autoscaling.AutoScalingLaunchConfiguration
it has only ~55GB disk attached (/dev/nvme1n1 53G
). Can you please help me to understand why and how I can increase disk size?stocky-spoon-28903
12/04/2019, 3:12 PMworried-caravan-35560
12/04/2019, 4:22 PMbillions-lock-73409
12/04/2019, 4:23 PMplain-eye-9759
12/04/2019, 5:17 PM"variables": {
"storageAccountName": config.appServicePlanStorageName,
"storageAccountKey": appStorageAccount.primaryAccessKey,
"location": config.location,
}
Note that storageAccountKey
is gotten from another resource
When the resource got deployed, the value of storageAccountKey was this:
Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee <https://pulumi.io/help/outputs> for more details.\\nThis function may throw in a future version of @pulumi/pulumi.
I have tried
"storageAccountKey": appStorageAccount.primaryAccessKey.apply(v => JSON.stringify(v))
"storageAccountKey": pulumi.output(appStorageAccount.primaryAccessKey).apply(JSON.stringify)
`"storageAccountKey": pulumi.all([appStorageAccount.primaryAccessKey]).apply(([v]) => ${v}
)`clever-nest-47198
12/04/2019, 6:10 PMclever-nest-47198
12/04/2019, 6:10 PMRe-apply "propagate resource inputs to resource state during preview, including first-class unknown values." The new set of changes have additional fixes to ensure backwards compatibility with earlier code. This allows the preview to better estimate the state of a resource after an update, including property values that were populated using defaults calculated by the provider. #3327this change has bit us in two different repos
clever-nest-47198
12/04/2019, 6:21 PMclever-nest-47198
12/04/2019, 6:24 PMclever-nest-47198
12/04/2019, 6:32 PMThe primary use case for these APIs is to allow nested, properties with
known values to be accessed via the lifted property accessor even when
the containing property is not fully know. A common example of this
pattern is theproperty of a Kubernetesmetadata.name
Namespace
object: while other properties of thebag may be unknown,metadata
is often known. These APIs allowname
to return ans.metadata.name
known value in this case.luckily theres a great git commit status message that listed exactly what my name was
clever-nest-47198
12/04/2019, 6:33 PMdef extract_resource_name(service_account_resource):
return service_account_resource.metadata['name']
in order to get the fun -randombits Pulumi adds at the end when making the ClusterRoleBinding in pythonbusy-umbrella-36067
12/04/2019, 6:38 PMnull is not an object (evaluating 'Object.keys(n)') DISMISS
proud-animal-24343
12/04/2019, 8:35 PMpulumi plugin install
command when it is run from a package manager? Specifically, I'd like to omit the output: [resource plugin aws-1.7.0] installing
some-carpenter-53382
12/04/2019, 9:28 PMsome-carpenter-53382
12/04/2019, 9:29 PMpulumi render
command where I can get raw yaml out of my templatealert-monitor-93874
12/04/2019, 10:16 PMpulumi preview
. It has now been running for > 10 minutes. I checked the previous time that it was run in activity history (17 Nov) and it completed in "seconds". Nothing has changed in the stack since then.steep-printer-55468
12/04/2019, 10:39 PMawsx.ec2.Vpc
to manage VPCs. I have a VPC that previously didn't configure any NAT gateways. I just updated it with numberofNatGateways: 2
to add some gateways but Pulumi doesn't detect the change. Is that a bug? If not, what am I doing wrong? And if so... how do I work around it?steep-printer-55468
12/04/2019, 10:39 PMawsx.ec2.Vpc
to manage VPCs. I have a VPC that previously didn't configure any NAT gateways. I just updated it with numberofNatGateways: 2
to add some gateways but Pulumi doesn't detect the change. Is that a bug? If not, what am I doing wrong? And if so... how do I work around it?lemon-spoon-91807
12/05/2019, 1:06 AMsteep-printer-55468
12/05/2019, 2:33 AMconst privateVpc = new awsx.ec2.Vpc("private", {
cidrBlock: "10.255.0.0/16",
numberOfAvailabilityZones: 2,
numberOfNatGateways: 2,
subnets: [
{ type: "private", name: "private", cidrMask: 24 },
{ type: "isolated", name: "database", cidrMask: 24 },
]
});
for (let subnet of privateVpc.privateSubnets) {
let gw = privateVpc.addNatGateway(`natgw-${subnet.subnetName}`, {
subnet: subnet.id,
});
subnet.createRoute(`natgw-route-${subnet.subnetName}`, {
destinationCidrBlock: "0.0.0.0/0",
natGatewayId: gw.natGateway.id,
});
}