millions-furniture-75402
05/27/2020, 1:00 PM...
const parameterVpcId = config.require("parameterVpcId");
export const privateSubnetIds: [] = config.requireObject("privateSubnetIds");
export const publicSubnetIds: [] = config.requireObject("publicSubnetIds");
export const vpcId: pulumi.Output<string> = pulumi.output(aws.ssm.getParameter({
name: parameterVpcId,
})).value;
const vpc = awsx.ec2.Vpc.fromExistingIds(`${appName}-local-vpc`, {
vpcId,
privateSubnetIds,
publicSubnetIds,
});
...
`catmeme/application/develop-test`:
...
const stackDevelop = new pulumi.StackReference("catmeme/shared-infra-develop/develop");
const vpc = awsx.ec2.Vpc.fromExistingIds("bvt", {
vpcId: stackDevelop.getOutput("vpcId"),
// @ts-ignore
privateSubnetIds: stackDevelop.getOutput("privateSubnetIds") as pulumi.Output<string[]>,
// @ts-ignore
publicSubnetIds: stackDevelop.getOutput("publicSubnetIds") as pulumi.Output<string[]>,
});
...
I get an error:
error: Preview failed: resource 'vpc-03489fb5e3c04080d' does not exist
But the VPC with that ID does exist. For all intents and purposes, shared-infra declared the VPC the same way and there isn’t a problem. What am I missing?dazzling-sundown-39670
05/27/2020, 1:38 PMmillions-furniture-75402
05/27/2020, 1:39 PMmillions-furniture-75402
05/27/2020, 2:26 PM// has missing properties error when I try to use it
const alb = pulumi.output(<http://aws.lb|aws.lb>.getLoadBalancer({
// @ts-ignore
arn: stackSandbox.getOutput("albArn")
}));
// declares a new ALB
const alb = new <http://awsx.lb|awsx.lb>.ApplicationLoadBalancer("test-default-lb", {
// @ts-ignore
arn: stackSandbox.getOutput("albArn"),
subnets: stackSandbox.getOutput("publicSubnetIds").apply(v => v),
vpc
});
dazzling-sundown-39670
05/27/2020, 2:41 PM@pulumi/kubernetes/helm/v2
, how do I add another repo? Using helm I would run helm repo add jetstack <https://charts.jetstack.io>
for examplewide-journalist-154
05/27/2020, 3:22 PMpulumi up
I get this error:
Exception: invocation of aws:iam/getPolicyDocument:getPolicyDocument returned an error: grpc: error while marshaling: proto: repeated field Values has nil element
This is the code from a policy_document
that is causing the error:
"resources": [ds_key.arn.apply(lambda arn: f'{arn}')]
I've tried adding the depends_on
option to the policy_document
resource, but it didn't help.
opts=pulumi.ResourceOptions(depends_on=[ds_key])
This is one of several places in my pulumi code where I need to access the arn
of another resource to create a policy_document
. I used the apply
function as shown in this code for the key, and added the depends_on
option, but I haven't been able to get any of them to work. I've resorted to "build" functions that create arns
from resource names - a hack I'd like to get rid of and not something that works in the case of keys.
Any instructions/suggestions or sample python code you can share would be much appreciated - thanks!gifted-city-99717
05/27/2020, 4:19 PMconfig:
aws:region: us-east-2
tsdb:tags:
Name: tsdb-dev
Foo: bar
tsdb:instanceSize: t2.micro
millions-furniture-75402
05/27/2020, 7:31 PMpulumi stack rename organization/new-project-name/stack
but the proj-group-name in the pulumi app still shows the old name. Is this solveable?mammoth-night-22453
05/27/2020, 8:14 PMconfig:
proj:data:
nonProductionStart: 10.1.0.0
productionStart: 10.2.0.0
stacks:
- name: Sandbox
peerConnectionName: peerConnectionId
stackName: org/Sandbox/mono
I can indeed follow the docs and get a JsonElement first, then get the sub-element as a string using something like
var data = Configuration.GetObject<JsonElement>("data");
var stacksAsString = data.GetProperty("stacks");
But what I really am trying to do is something like:
var stacks = Configuration.GetObject<List<StackReferenceInfo>>("data.stacks");
But, this does not appear to work. Is there no way to achieve this without jumping through the JsonElement hoop?
I have reviewed https://www.pulumi.com/docs/intro/concepts/config/#structured-configuration and it shows the JsonElement method - perhaps that's the only way?important-appointment-55126
05/27/2020, 9:01 PMaverage-receptionist-65239
05/28/2020, 1:38 AMaverage-receptionist-65239
05/28/2020, 1:43 AMaverage-receptionist-65239
05/28/2020, 4:04 AMdazzling-sundown-39670
05/28/2020, 1:15 PMtime="2020-05-28T13:10:26Z" level=info msg="Assuming role: arn:aws:iam::503405380068:role/k8s-pulumi-instanceRole-role-9e5a01b"
time="2020-05-28T13:12:30Z" level=error msg="AccessDenied: User: arn:aws:sts::503405380068:assumed-role/k8s-pulumi-instanceRole-role-9e5a01b/i-0dcb94de93da90dae is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::503405380068:role/k8s-pulumi-instanceRole-role-9e5a01b\n\tstatus code: 403, request id: 33ba5c26-7b45-4234-a762-b2f1ac4d8a42"
I've put the relevant code here in a gist if you want to check it out: https://gist.github.com/benjick/7c096f5634b34f022adf81469d440d4a
Cheers!millions-furniture-75402
05/28/2020, 2:34 PM.env
file with an ECS task definition? It looks like environment
supports an array of key value objects, but nothing akin to --env-file
… should I just read in that file locally, and dynamically build the key values array?bumpy-beach-79487
05/28/2020, 2:59 PMhelm_secrets
with Pulumi ?brash-manchester-88595
05/28/2020, 3:15 PMerror: post-step event returned an error: failed to normalize URN references: Two resources ('<urn1>' '<urn2>') aliased to the same: '<urn3>'
this is only detected during execution, could this be made a planning phase detection? Possibly relevant: one of those resources was being imported.
It breaks the import, leaving the to-be-imported resources in state ‘unknown’, requiring manual stack edits..bitter-island-28909
05/28/2020, 7:15 PMError authorizing security group ingress rules: InvalidPermission.Malformed: Unsupported IP protocol "-1" - supported: [tcp, udp, icmp]
able-beard-29160
05/28/2020, 7:33 PMwonderful-dog-9045
05/28/2020, 9:10 PMpulumi destroy --target-dependents -t urn:pulumi:dev::leaderboard::aws:ebs/volume:Volume::leaderboard-dev
)millions-furniture-75402
05/28/2020, 9:12 PMtimeoutInMinutes
in the args. Am I missing something?
new aws.cloudformation.Stack(`${name}-cfn`, {
parameters: { ... },
capabilities: ["CAPABILITY_IAM"],
timeoutInMinutes: 120
}
The exact error:
aws:cloudformation:Stack (controller-tableau-cfn):
error: 1 error occurred:
* creating urn:pulumi:controller::shared-infra-controller::aws:cloudformation/stack:Stack::controller-tableau-cfn: timeout while waiting for state to become 'CREATE_COMPLETE, CREATE_FAILED, DELETE_COMPLETE, DELETE_FAILED, ROLLBACK_COMPLETE, ROLLBACK_FAILED' (last state: 'CREATE_IN_PROGRESS', timeout: 20m0s)
handsome-football-37974
05/28/2020, 9:33 PMvictorious-vase-44805
05/28/2020, 9:35 PMexport function setUpK8sProvider(rkeCluster: rke.Cluster): k8s.Provider {
return new k8s.Provider("rancherCluster", {
cluster: rkeCluster.clusterName,
kubeconfig: rkeCluster.kubeConfigYaml
}, { dependsOn: rkeCluster })
}
export function createNamespace(clusterProvider: k8s.Provider): k8s.core.v1.Namespace {
return new k8s.core.v1.Namespace("cert-manager", {
metadata: {
name: "cert-manager",
labels: {"<http://certmanager.k8s.io/disable-validation|certmanager.k8s.io/disable-validation>": "true" }
}
}, { provider: clusterProvider, dependsOn: [clusterProvider] })
}
export function createCertManager(certManagerNamespace: k8s.core.v1.Namespace, clusterProvider: k8s.Provider): k8s.helm.v3.Chart {
return new k8s.helm.v2.Chart(
'cert-manager',
{
chart: 'cert-manager',
version: 'v0.15.1',
namespace: certManagerNamespace.metadata.name,
values: {
installCRDs: true,
},
fetchOpts: {
repo: '<https://charts.jetstack.io>',
},
},
{
dependsOn: certManagerNamespace,
provider: clusterProvider
},
);
}
export function createRancherServer(serverName: string, clusterProvider: k8s.Provider, certManager: k8s.helm.v3.Chart): k8s.helm.v3.Chart {
let namespace = new k8s.core.v1.Namespace("rancher", {
metadata: {
name: "rancher",
}
}, { provider: clusterProvider, dependsOn: [certManager] })
return new k8s.helm.v2.Chart(serverName, {
chart: "rancher",
namespace: namespace.metadata.name,
fetchOpts: {
repo: "<https://releases.rancher.com/server-charts/stable>"
},
values: {
"hostname": "<http://rancher.mydomain.com|rancher.mydomain.com>",
"ingress.tls.source": "letsEncrypt",
"letsEncrypt.email": "<mailto:myemail@mydomain.com|myemail@mydomain.com>"
}
}, { provider: clusterProvider, dependsOn: [namespace] })
}
Any idea where I’m going wrong perhaps?millions-judge-24978
05/29/2020, 5:36 AMget()
methods like k8s.core.v1.Service.get
?
Imagine creating an operator with pulumi, and needing some info about a Service
that it will create as a result.alert-restaurant-79151
05/29/2020, 9:08 AMdazzling-sundown-39670
05/29/2020, 11:31 AMmillions-furniture-75402
05/29/2020, 12:53 PMenough-kite-69616
05/29/2020, 3:02 PMns/secretname
like the docs suggest, but it doesn't seem to workfull-dress-10026
05/29/2020, 8:34 PMk8s.yaml.ConfigFile
results in a "no such file or directory" error. Visiting that URL in the browser results in a 404. Does anyone have any idea what this URL format is and if/how it could work with Pulumi?mammoth-oyster-21227
05/29/2020, 9:59 PMpulumi.output
? I’m catching strange behaviour very often and there is no way to debug stacks.