full-bear-42554
11/12/2020, 7:48 PMpulumi up
. I've configured Pulumi to use service account credentials with GCP, but it errors reporting
* Error when reading or editing Instance 1214816920423977412: googleapi: Error 403: Compute Engine API has not been used in project 349729176759 before or it is disabled. Enable it by visiting <https://console.developers.google.com/apis/api/compute.googleapis.com/overview?project=349729176759> then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfigured
full-bear-42554
11/12/2020, 7:50 PMfull-bear-42554
11/12/2020, 7:55 PMbillowy-army-68599
11/12/2020, 8:15 PMfull-bear-42554
11/12/2020, 9:05 PMmain.go
(my program) to match the version in GCP.full-bear-42554
11/12/2020, 9:05 PMDo you want to perform this update? details
+ pulumi:pulumi:Stack: (create)
[urn=urn:pulumi:dev::webbie::pulumi:pulumi:Stack::webbie-dev]
= gcp:compute/instance:Instance: (import)
[id=projects/webbie-295322/zones/us-west1-a/instances/webbie]
[urn=urn:pulumi:dev::webbie::gcp:compute/instance:Instance::mr. webbie]
- serviceAccount: {
- email : "<mailto:1038906272696-compute@developer.gserviceaccount.com|1038906272696-compute@developer.gserviceaccount.com>"
- scopes: [
- [0]: "<https://www.googleapis.com/auth/devstorage.read_only>"
- [1]: "<https://www.googleapis.com/auth/logging.write>"
- [2]: "<https://www.googleapis.com/auth/service.management.readonly>"
- [3]: "<https://www.googleapis.com/auth/servicecontrol>"
- [4]: "<https://www.googleapis.com/auth/trace.append>"
- [5]: "<https://www.googleapis.com/auth/monitoring.write>"
]
}
- tags : [
- [0]: "https-server"
- [1]: "http-server"
full-bear-42554
11/12/2020, 9:06 PMserviceAccount
and tags
specified in the Instance
specification?full-bear-42554
11/12/2020, 9:18 PMfull-bear-42554
11/12/2020, 9:18 PMfull-bear-42554
11/12/2020, 9:19 PMfull-bear-42554
11/12/2020, 9:19 PMfull-bear-42554
11/12/2020, 9:20 PMinst, err := compute.NewInstance(ctx, "mr. webbie", &compute.InstanceArgs{
BootDisk: &compute.InstanceBootDiskArgs{
InitializeParams: &compute.InstanceBootDiskInitializeParamsArgs{
Image: pulumi.String("debian-cloud/debian-10-buster"),
Size: <http://pulumi.Int|pulumi.Int>(30),
},
},
MachineType: pulumi.String("f1-micro"),
Name: pulumi.String("webbie"),
NetworkInterfaces: &compute.InstanceNetworkInterfaceArray{
&compute.InstanceNetworkInterfaceArgs{
Network: pulumi.String("default"),
},
},
ServiceAccount: compute.InstanceServiceAccountArgs{
Email: pulumi.String("<mailto:1038906272696-compute@developer.gserviceaccount.com|1038906272696-compute@developer.gserviceaccount.com>"),
Scopes: pulumi.StringArray{
pulumi.String("<https://www.googleapis.com/auth/devstorage.read_only>"),
pulumi.String("<https://www.googleapis.com/auth/logging.write>"),
pulumi.String("<https://www.googleapis.com/auth/service.management.readonly>"),
pulumi.String("<https://www.googleapis.com/auth/servicecontrol>"),
pulumi.String("<https://www.googleapis.com/auth/trace.append>"),
pulumi.String("<https://www.googleapis.com/auth/monitoring.write>"),
},
},
Project: pulumi.String("webbie-295322"),
Zone: pulumi.String("us-west1-a"),
Tags: pulumi.StringArray{
pulumi.String("https-server"),
pulumi.String("http-server"),
},
},
pulumi.Import(pulumi.ID("1214816920423977412")),
)
full-bear-42554
11/12/2020, 9:21 PMinst, err := compute.NewInstance(ctx, "mr. webbie", &compute.InstanceArgs{
BootDisk: &compute.InstanceBootDiskArgs{
InitializeParams: &compute.InstanceBootDiskInitializeParamsArgs{
Image: pulumi.String("debian-cloud/debian-10-buster"),
Size: <http://pulumi.Int|pulumi.Int>(30),
},
},
MachineType: pulumi.String("f1-micro"),
Name: pulumi.String("webbie"),
NetworkInterfaces: &compute.InstanceNetworkInterfaceArray{
&compute.InstanceNetworkInterfaceArgs{
Network: pulumi.String("default"),
},
},
Project: pulumi.String("webbie-295322"),
Zone: pulumi.String("us-west1-a"),
},
pulumi.Import(pulumi.ID("1214816920423977412")),
)
full-bear-42554
11/12/2020, 9:21 PMfull-bear-42554
11/12/2020, 9:21 PMfull-bear-42554
11/12/2020, 9:22 PMfull-bear-42554
11/12/2020, 9:24 PMImport
line from my source code? If so, are ther also other lines that I can safely remove?broad-keyboard-684
11/12/2020, 9:48 PM_, err = kinesis.NewFirehoseDeliveryStream(ctx, deliveryStreamName, &kinesis.FirehoseDeliveryStreamArgs{
Destination: "splunk",
S3Configuration: &<WHAT IS THIS>{
RoleArn: firehoseRole.Arn(),
BucketArn: logBucket.Arn(),
BufferSize: 10,
BufferInterval: 400,
CompressionFormat: "GZIP",
},
SplunkConfiguration: &<WHAT IS THIS>{
HecEndpoint: "<https://http-inputs-mydomain.splunkcloud.com:443>",
HecToken: "ABC1234-4567-8910-ABCD-ABCDEFGHIJK",
HecAcknowledgmentTimeout: 600,
HecEndpointType: "Event",
S3BackupMode: "FailedEventsOnly",
},
})
breezy-butcher-78604
11/13/2020, 6:16 AM--help
sections doesn't seem to show much. if i run pulumi login
again it doesn't prompt me for a username, just logs me back in to my work account.limited-island-40412
11/13/2020, 7:57 AMpulumi login
pulumi stack select dev
echo "##vso[task.setvariable variable=webapp.billingApi]$(pulumi stack output billingApi)"
and the stack cannot be found. I set the same working directory as in the pulumi task.
2020-11-12T12:05:15.7625612Z Logged in to xxx as vsts (azblob://***-infrastructure)
2020-11-12T12:05:16.1752240Z error: no stack named 'dev' found
2020-11-12T12:05:16.2685326Z error: no stack selected; please use `pulumi stack select` to choose one
How can I figure out whats wrong? I don’t see any error. Even in verbose output. My state is stored in an azure blob storage containernumerous-artist-1705
11/13/2020, 9:20 AMtf.json
files? Or even .tf
? That could help transitioning by just using the Pulumi CLI referencing existing Terraform code. I appreciate maintaining something that works with the HCL language is a big overhead, but, at least supporting tf.json
should be more trivial. Also, as Pulumi has already tf2pulumi
, probably part of the work of parsing HCL is already there.able-shampoo-38014
11/13/2020, 2:23 PMconst ecrRepository = new aws.ecr.Repository('batch-services-pulumi', {
name: 'batch-services-pulumi',
imageScanningConfiguration: {
scanOnPush: true,
},
imageTagMutability: 'MUTABLE',
});
const batchJobDefinition = new aws.batch.JobDefinition(
'image_processor_pulumi',
{
name: 'image_processor_job_definition_pulumi',
retryStrategy: { attempts: 3 },
timeout: { attemptDurationSeconds: 1200 },
containerProperties: `{
"command": [ "blah" ],
"image": "${ecrRepository.repositoryUrl}",
"memory": 1024,
"vcpus": 1,
"otherprops" ...
}
`,
type: 'container',
},
{
dependsOn: [ecrRepository],
},
);
The template literal is throwing an error when using pulumi preview
error: aws:batch/jobDefinition:JobDefinition resource 'image_processor_pulumi' has a problem: AWS Batch Job container_properties is invalid: Error decoding JSON: invalid character '\n' in string literal
after debugging, it looks like its applying this value
{
"command": [ "blah" ],
"image": Calling [toString] on an [Output<T>] is not supported.
To get the value of an Output<T> as an Output<string> consider either:
1: o.apply(v => `prefix${v}suffix`)
2: pulumi.interpolate `prefix${v}suffix`
See <https://pulumi.io/help/outputs> for more details.
This function may throw in a future version of @pulumi/pulumi.,
"memory": 1024,
"vcpus": 1,
morestuff ...
}
we tried to use apply and interpolate to formate and that seems to work outside of the template literal, but not when its applied inside. Any help would be appreciated (this is our last hurdle to get a working POCred-area-47037
11/13/2020, 2:43 PMcurved-summer-41191
11/13/2020, 6:26 PMgithub:token
; it keeps showing up as token
- anything else (foo:bar) will show as such... is this a bug?dazzling-sundown-39670
11/13/2020, 9:27 PMbright-orange-69401
11/14/2020, 9:10 AMbright-orange-69401
11/14/2020, 9:18 AMboto3
definitely has them !
I kinda wonder how I can interact with the pulumi_aws.Provider
instance to share credentials and stuff : should I declare it as a dependency of my dynamic.Resource
? If so, what should be the link between the pulumi_aws.Provider
and my dynamic.Provider
?
We've achieved some working examples with my team but I'm not quite satisfied with it : most of the time we ended up with unstable stacks and locked states (had to pulumi stack export/import
)rich-alligator-22189
11/14/2020, 1:38 PM<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Pulumi.Azure" Version="3.*" />
</ItemGroup>
</Project>
purple-alarm-70362
11/14/2020, 4:10 PMclean-dentist-2515
11/14/2020, 5:46 PMThe public key. If this is a file, it can be read using the file interpolation functionwhere can I find this "file interpolation function"?
clean-dentist-2515
11/14/2020, 5:46 PMThe public key. If this is a file, it can be read using the file interpolation functionwhere can I find this "file interpolation function"?
___main___.py
to get file contentsbroad-dog-22463
11/14/2020, 5:50 PMclean-dentist-2515
11/14/2020, 5:50 PMbroad-dog-22463
11/14/2020, 5:51 PMclean-dentist-2515
11/14/2020, 5:56 PM@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, ...) -> SshKey
raises the question... "staticmethod of what?"
I understood this to mean I should do something like:
import pulumi_digitalocean as do
key = do.SshKey.get(...)
def SshKey(resource_name: str, opts: Optional[ResourceOptions] = None, name: Optional[str] = None, public_key: Optional[str] = None)
so it looks like do.SshKey
is a factory function rather than a class
I couldn't think of any other way to interpret it thoughbroad-dog-22463
11/14/2020, 6:01 PM