salmon-beard-79336
11/04/2019, 12:22 PMprincipalId
from the identity
property of API Management service: export const dump = service.identity.principalId
However, it seems that accessing properties of identity
is not doable for some reason:
error TS2339: Property 'principalId' does not exist on type 'Output<ServiceIdentity | undefined>'.
Property 'principalId' does not exist on type 'OutputInstance<ServiceIdentity | undefined> & LiftedObject<undefined, never>'.
But the outputs of apimanagement say it should be possible
interface ServiceIdentity {
/**
* The Principal ID associated with this Managed Service Identity.
*/
principalId: string;
/**
* The Tenant ID associated with this Managed Service Identity.
*/
tenantId: string;
type: string;
}
Am I missing anything?
….
Forgot to mention that outputting the identity
object works as expected
~ dump: {
+ dump: {
+ principalId: "9f9e1f60-933e-49b5-b6a3-7c416e2b542a"
+ tenantId : "152e4c75-3657-4284-bb2c-0d825873d72b"
+ type : "SystemAssigned"
}
}
tall-librarian-49374
11/04/2019, 12:26 PMservice.identity.apply(id => id && id.principalId);
tall-librarian-49374
11/04/2019, 12:27 PMidentity
is not always there (| undefined
) makes it a bit harder to use.salmon-beard-79336
11/04/2019, 12:28 PMtall-librarian-49374
11/04/2019, 12:29 PMcreamy-shoe-96075
11/04/2019, 1:51 PMazure.appservice.AppService
melodic-family-5784
11/04/2019, 6:38 PMconst statsdPortProtocol: aws.ecs.Protocol = 'udp';
const statsdAdminPortProtocol: aws.ecs.Protocol = 'tcp';
const statsdPort = { port: 8125, protocol: statsdPortProtocol };
const statsdAdminPort = { port: 8126, protocol: statsdAdminPortProtocol };
and used it as
portMappings: [statsdPort, statsdAdminPort]
but I am getting the error:
Invalid 'containerPort' setting for container 'statsd'.
mammoth-account-65260
11/06/2019, 9:14 PMancient-plastic-80816
11/07/2019, 8:28 PM{import:"resource id"}
.
Problem is that some resources give warnings like the following, while the inputs are configured exactly the same as previous TF code and is correct in relation to the existing TF state. 🤔
And if I run terraform plan
there are no changes to be made, so there should not be any wild configuration changes floating around.
digitalocean:index:Droplet (mgr):
warning: inputs to import do not match the existing resource; importing this resource will fail
stocky-island-3676
11/08/2019, 1:41 PMnpm
?
The only solution I’ve found so far seems to be switching to yarn
at all. (see https://github.com/npm/npm/issues/2974 -> https://npm.community/t/allow-installing-packages-from-git-subdirectories/3973)brave-window-69382
11/11/2019, 1:32 PMchilly-crayon-57653
acceptable-army-69872
11/14/2019, 7:23 PM// import { Repository, RepositoryImage } from "@pulumi/awsx/ecr";
export function createImage() : RepositoryImage {
const repository = new Repository("myrepo");
const repImage = repository.buildAndPushImage("./Application");
return repImage
}
and I get this error on the return line error TS2739: Type 'OutputInstance<string> & LiftedObject<String, number | "length">' is missing the following properties from type 'RepositoryImage': repository, imageValue, image, environment
. If I change createImage() : RepositoryImage
to any I get a string error...whats going on here?acceptable-army-69872
11/14/2019, 7:25 PMstocky-island-3676
11/14/2019, 8:09 PMpulumi.ComponentResourceOptions
? I want to add dependsOn
to a kubernetesOptions
variable defined beforehand.stocky-island-3676
11/14/2019, 8:35 PMimport:
for resources in a helm.v2.Chart()
as well? (See https://www.pulumi.com/blog/adopting-existing-cloud-resources-into-pulumi/) Maybe via transformations
?nutritious-battery-42762
11/15/2019, 4:48 PMconst appService = new awsx.ecs.FargateService("app-svc2", {
cluster,
taskDefinitionArgs: {
containers: {
php: {
image: img,
cpu: 102 /*10% of 1024*/,
memory: 50 /*MB*/,
essential: true
},
nginx: {
image: nginx,
cpu: 102 /*10% of 1024*/,
memory: 50 /*MB*/,
portMappings: [web],
essential: true,
},
}
},
desiredCount: 2
});
rhythmic-finland-36256
11/18/2019, 10:14 AMpulumi.Output
when using helper functions that want unboxed values (and especially reusing the result for a new pulumi resource name)happy-parrot-60128
11/21/2019, 3:07 PMnice-guitar-97142
11/21/2019, 3:53 PMpulumi preview
do that for you?quaint-artist-58613
11/28/2019, 10:54 PMimport * as pulumi from "@pulumi/pulumi";
const current_stack = pulumi.getStack(); // assume current_stack deployed into account A
const infra_stack = new pulumi.StackReference(`acmecorp/infra/${current_stack}`); // assume infra_stack also deployed into account A
But is there a way to do stackreference across aws accounts ?
import * as pulumi from "@pulumi/pulumi";
const current_stack = pulumi.getStack(); // assume current_stack deployed into account A
const infra_stack = new pulumi.StackReference(`acmecorp/infra/${current_stack}`); // assume infra_stack deployed into account B, does this really work ?
Thanks.bored-jackal-93148
12/08/2019, 11:44 PMpnpm
rather than npm
or ``yarn``plain-eye-9759
12/10/2019, 10:22 AMbase.yaml
that pulumi.dev.yaml
, and pulumi.staging.yaml
can share some common values from the base?handsome-truck-95168
12/11/2019, 7:17 PMhandsome-truck-95168
12/11/2019, 7:43 PMglamorous-waitress-51149
12/12/2019, 11:33 AMastonishing-cartoon-37000
12/12/2019, 5:55 PMComponentResourceOptions
? i'm getting
index.ts(29,47): error TS2322: Type 'Provider' is not assignable to type 'ProviderResource'.
Types of property 'id' are incompatible.
when trying to
const k8sProvider = new k8s.Provider(`cointainers-${environment}`, {
kubeconfig: fs.readFileSync(`.circleci/${environment}.json`).toString()
})
const t = new test({provider: k8sProvider}) // <---- pass provider as options to class which extends pulumi.ComponentResource
class test extends pulumi.ComponentResource {
constructor(opts?: pulumi.ComponentResourceOptions) {
super('test', "test", {}, opts)
}
}
rhythmic-hair-33677
12/12/2019, 8:31 PMpulumi.ComponentResource
to build in some validation logic. What I am seeing is that if I throw a pulumi.ResourceError
pulumi prints it twice with a stack trace. It appears that pulumi.ResourceError ignores my “hideStack = true” parameter. It also appears that apply occurs before or regardless of an error creating the output. I’m probably doing something wrong here, but I would like to have a single nice error displayed w/o the stack and only perform validation if the underlying resource create succeeds.rhythmic-hair-33677
12/12/2019, 9:56 PMbusy-magazine-48939
12/13/2019, 4:29 AMTypeError: Cannot read property 'publicIp' of undefined
const sgc = new aws.ec2.SecurityGroup('sg-c', {
vpcId: vpcId,
name: `${baseTags.Prefix}-intranet-sg`,
ingress: [{
protocol: 'tcp',
fromPort: 1521,
toPort: 1521,
cidrBlocks: [`${vmaEip.publicIp}/32`],
}],
tags: baseTags
})
const vma = new aws.ec2.Instance('vm-a', {
tags: { Name: `${baseTags.Prefix}-vm-a`, ...baseTags },
instanceType: 't3.xlarge',
vpcSecurityGroupIds: [sgc.id],
ami: AMI_ID,
subnetId: subnetId,
keyName: deployer.keyName,
privateIp: VMA_IP
}, { deleteBeforeReplace: true })
const vmaEip = new aws.ec2.Eip("vm-a-eip", {
associateWithPrivateIp: vma.privateIp,
instance: vma.id,
vpc: true,
tags: baseTags
})