alert-france-93241
10/08/2019, 8:15 AMstocky-spoon-28903
10/08/2019, 8:15 AMalert-france-93241
10/08/2019, 8:18 AMstocky-island-3676
10/08/2019, 8:23 AMimage
of a Kubernetes Deployment is not displayed as a change with pulumi up --refresh
. I changed it directly with kubectl edit
.
The details view of pulumi up
shows that the image
will be refreshed in the stack, though.
What do I do wrong?
(The code is from pulumi new kubernetes-typescript
with fixed image
& minikube
provider.)rhythmic-finland-36256
10/08/2019, 1:59 PMComponentResource
for that?stale-park-1622
10/09/2019, 3:02 AMnutritious-midnight-45753
10/09/2019, 2:49 PMProgram run without the Pulumi engine available; re-run using the pulumi CLI
incalculable-engineer-92975
10/11/2019, 3:35 PMhelpful-bear-175
10/12/2019, 4:15 PMstale-park-1622
10/13/2019, 3:56 PMconst vpcHostedZone = vpc.id.apply(vpcId => aws.route53.getZone({ vpcId }));
**Error: invocation of aws:route53/getZone:getZone returned an error: invoking aws:route53/getZone:getZone: Either name or zone_id must be set**
I can not seem to obtain the zone information from the network load balancer either. I can see it on aws console the Hosted zone information associated with the network load balancer. How can I obtain this programatically?
thanksbillowy-needle-56870
10/15/2019, 10:32 AMbillowy-needle-56870
10/15/2019, 10:33 AMhandsome-yak-9760
10/15/2019, 3:30 PMbillowy-needle-56870
10/15/2019, 6:06 PMbusy-magazine-48939
10/16/2019, 8:25 AMpulumi.Output.apply()
function, in particular I am not sure how to work with pulumu.Output<any>
during preview:
const vpc = new awsx.ec2.Vpc("vpc", {
cidrBlock: '10.0.0.0/16',
enableDnsHostnames: true,
numberOfAvailabilityZones: 1,
subnets: [
{
type: "public",
name: `${prefix}-app`,
location: "10.0.1.0/26",
tags: {
subnetType: "apps", // <-- my custom tag I intent to filter by
...commonTags
}
},
{
type: "public",
name: `${prefix}-osb`,
location: {
cidrBlock: "10.0.20.0/26",
availabilityZone: `${region}a`
},
tags: { subnetType: "osb", ...commonTags }
}
],
tags: { Name: "Collaboration Zone", ...commonTags }
})
const instance = new aws.ec2.Instance("instance", {
tags: { "Name": `${prefix}-instance`, ...commonTags },
instanceType: 't2.large',
vpcSecurityGroupIds: [sg.id],
ami: ami,
subnetId: vpc.publicSubnets // <-- awsx.ec2.Subnet
.filter(subnet => filterSubnetByTag('apps', subnet))
.map(subnet => subnet.id)[0],
keyName: deployer.keyName
})
function filterSubnetByTag(subnetTag: string, subnet: awsx.ec2.Subnet): boolean {
// subnet.subnet.tags is of the following type:
// readonly tags: pulumi.Output<{
// [key: string]: any;
// } | undefined>;
// how do I filter pulumu.Output<any> during preview????
return !!(subnet.subnet.tags.apply(tag => tag && tag.subnetType && tag.subnetType === subnetTag))
}
modern-bear-85657
10/16/2019, 7:41 PMTypes of property 'Version' are incompatible.
Type 'string' is not assignable to type 'Input<"2008-10-17" | "2012-10-17">'.ts(2322)
stale-park-1622
10/16/2019, 8:14 PMconst nlb = new awsx.elasticloadbalancingv2.NetworkLoadBalancer(`network-lb`, {
vpc,
external: true
});
const tg = nlb.createTargetGroup(`tg`, {
port: 80,
protocol: "TCP",
});
const tlsListener = tg.createListener(`tls-listener`, {
vpc,
loadBalancer: nlb,
port: 443,
protocol: 'TLS',
certificateArn,
});
const tcpListener = tg.createListener(`listener`, {
vpc,
loadBalancer: nlb,
port: 80,
protocol: "TCP",
defaultAction: {
type: "redirect",
redirect: {
protocol: "TLS",
port: "443",
statusCode: "HTTP_301",
},
},
});
Diagnostics:
aws:lb:Listener (listener):
error: aws:lb/listener:Listener resource 'listener' has a problem: expected default_action.0.redirect.0.protocol to be one of [#{protocol} HTTP HTTPS], got TLS
Is there any issues with my code?
thanksacceptable-army-69872
10/17/2019, 2:39 PMrhythmic-finland-36256
10/18/2019, 1:49 PMServicePrincipal
is reported as a successful creation but all depending items (assignments, aks cluster) fail due to not finding the ServicePrincipal. Tried that several times. I’m on node10 and the latest versions of pulumi and the provider packages.acoustic-toothbrush-71581
10/18/2019, 5:27 PMapply()
I seem to get another promise? is this expected I didn't believe it would be. Am I taking the wrong approach here? Is there a better way? Currently we are loading the js kubernetes client and loading a kubeconfig then using it to check the deployment status. However we support at least 3 managed k8s providers and each of the pulumi modules have different ways to obtain the kubeconfig, making this harder. I was hoping to load a client from pulumis modules to check the deployment status.
// Deploy cert-manager
const certmanagerResources = new k8s.yaml.ConfigFile("cmResources", { file: `<https://github.com/jetstack/cert-manager/releasesdownload/${args.version}/cert-manager.yaml>`
let deployment = certmanagerResources.getResource("apps/v1/Deployment", "cert-manager-webhook")
deployment.apply(k => { k.status ) })` // error status isn't a propery
console.log(Object.getOwnPropertyNames(deployment))
console.log(deployment.apply(k => { Object.getOwnPropertyNames(k) }))
//results in
[ '__pulumiOutput',
'isKnown',
'isSecret',
'resources',
'promise',
'toString',
'toJSON',
'apply',
'get' ]
OutputImpl {
__pulumiOutput: true,
isKnown: Promise { <pending> },
isSecret: Promise { <pending> },
resources: [Function],
promise: [Function],
toString: [Function],
toJSON: [Function],
apply: [Function],
get: [Function] }
plain-spring-19734
10/21/2019, 12:46 AMpulumi up
again to apply the update, I get this error:
error: Plan apply failed: 1 error occurred:
* updating urn:pulumi:lab::app-service::azure:frontdoor/frontdoor:Frontdoor::myfrontdoor: A resource with the ID "/subscriptions/{guid}/resourcegroups/my-rg/providers/Microsoft.Network/frontdoors/myfrontdoor" already exists - to be managed via Terraform this resource needs to be imported into the State.
It seems as if it's trying to create the resource again?
Here's my code:
const frontDoor = new azure.frontdoor.Frontdoor('myfrontdoor', {
resourceGroupName: resourceGroup.name,
tags: defaultTags,
name: 'myfrontdoor',
frontendEndpoints: [{
name: 'myfrontdoor-azurefd-net',
hostName: '<http://myfrontdoor.azurefd.net|myfrontdoor.azurefd.net>',
}],
backendPools: [{
name: 'backendPoolAll',
backends: [{
address: '<http://myapp.azurewebsites.net|myapp.azurewebsites.net>',
hostHeader: '<http://myapp.azurewebsites.net|myapp.azurewebsites.net>',
httpPort: 80,
httpsPort: 443,
priority: 1,
weight: 100,
enabled: true
},
],
healthProbeName: 'tdylabHealthProbeSettings',
loadBalancingName: 'tdylabLoadBalancingSettings',
}],
// etc.
// <other config snipped>
});
I also tried again using the example code from the docs and ran into the same issue.
https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/azure/frontdoor/#Frontdooralert-france-93241
10/21/2019, 9:25 AMalert-france-93241
10/21/2019, 9:26 AMworried-musician-21478
10/22/2019, 1:28 PMrapid-ram-37207
10/27/2019, 9:57 PMNetworkSecurityGroup
containing 3 Azure network security rules.
I want to export each network security rule as an output. like so :
const nsg = new NetworkSecurityGroup('nsg', nsgArgs)
export const nsgResource = nsg.group
export const port1234Rule = nsg.rules.find(r => {
return r.rule.name.get() === 'Deny_Outbound_Port1234'
})
export const consulRule = nsg.rules.find(r => {
return r.rule.name.get() === 'Allow_Inbound_Vnet_Consul'
})
export const sshRule = nsg.rules.find(r => {
return r.rule.name.get() === 'Allow_Inbound_SSH'
})
But I'm getting this error :
pulumi:pulumi:Stack (azure-network-security-group-ci):
error: Running program '/home/mathieu/git/pulumi-azure-network-security-group/tests/stack' failed with an unhandled exception:
Error: Cannot call '.get' during update or preview.
To manipulate the value of this Output, use '.apply' instead.
How can I get the specific rule I want out of the collection of rules from an apply()
call ?
Or, is there a better way to do this ?
Sorry if this is a silly question, I'm fairly new to TypeScript.quiet-wolf-18467
10/28/2019, 8:19 AMdockerconfigjson
with Pulumi. I'm running into problems:
export const imagePullSecret = new k8s.core.v1.Secret(
"docker-hub",
{
type: "<http://kubernetes.io/dockerconfigjson|kubernetes.io/dockerconfigjson>",
metadata: {
namespace: "community"
},
data: {
".dockerconfigjson": config
.requireSecret("docker-hub-token")
.apply(value => {
Buffer.from(
JSON.stringify({
auths: {
"<https://index.docker.io/v1/>": {
auth: value
}
}
})
).toString("base64");
})
}
},
{
provider: kubernetesProvider
}
);
Diagnostics:
kubernetes:core:Secret (docker-hub):
error: check failed because malformed resource inputs: malformed RPC secret: missing value
Any advice, @creamy-potato-29402?rapid-ram-37207
10/29/2019, 7:06 PMconsulRule
and sshRule
are incorrect.
All the rule outputs have the same property values :
https://gist.github.com/MathieuBuisson/0aeb53488077beb4da484cc79caad079#file-outputs-txt
As you can see in the Gist, all rules outputs are identical.
It looks like these 3 rules outputs are all referencing the same object : the first rule.
Could anyone give me any pointers on what I'm doing wrong here ?
Thank you.calm-parrot-72437
10/30/2019, 4:38 PMcalm-parrot-72437
10/30/2019, 4:38 PMchilly-article-21928
11/03/2019, 11:37 AMStackReference.getOutputSync
or StackReference.requireOutputSync
. In both cases, when I run pulumi preview
, the program get stuck calling these functions. Is it a known issue ?
Here is the snippet:
const env = pulumi.getStack();
const network = new pulumi.StackReference(`Shiroy/webhosting-network/${env}`);
const privateSubnetIds = <string[]>(
network.requireOutputSync("privateSubnetIds")
);
console.log(privateSubnetIds);
chilly-article-21928
11/03/2019, 11:37 AMStackReference.getOutputSync
or StackReference.requireOutputSync
. In both cases, when I run pulumi preview
, the program get stuck calling these functions. Is it a known issue ?
Here is the snippet:
const env = pulumi.getStack();
const network = new pulumi.StackReference(`Shiroy/webhosting-network/${env}`);
const privateSubnetIds = <string[]>(
network.requireOutputSync("privateSubnetIds")
);
console.log(privateSubnetIds);