breezy-laptop-42679
09/06/2022, 7:58 AMbig-spring-73541
09/06/2022, 9:02 AMimportant-sugar-9877
09/06/2022, 5:22 PMinstances[0].instance_data['Sys-sync']['instance_ip'].apply(
lambda instance_ip: command.local.run(
command=f"echo {instance_ip} > out.txt"
)
)
the type is Output, so Output.apply should work?
print(type(instances[0].instance_data['BFM-snow-sync']['instance_ip']))
<class 'pulumi.output.Output'>'
But im getting this error instead. Can anyone give me a hint on that?
Diagnostics:
pulumi:pulumi:Stack (BFM-snow-sync-dev):
error: Program failed with an unhandled exception:
error: Traceback (most recent call last):
File "/usr/local/bin/pulumi-language-python-exec", line 107, in <module>
loop.run_until_complete(coro)
File "/Users/username/.pyenv/versions/3.10.4/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/Users/username/cse-dev/git/BFM-snow-sync/.direnv/python-3.10.4/lib/python3.10/site-packages/pulumi/runtime/stack.py", line 126, in run_in_stack
await run_pulumi_func(lambda: Stack(func))
File "/Users/username/cse-dev/git/BFM-snow-sync/.direnv/python-3.10.4/lib/python3.10/site-packages/pulumi/runtime/stack.py", line 51, in run_pulumi_func
await wait_for_rpcs()
File "/Users/username/cse-dev/git/BFM-snow-sync/.direnv/python-3.10.4/lib/python3.10/site-packages/pulumi/runtime/stack.py", line 110, in wait_for_rpcs
raise exception
File "/Users/username/cse-dev/git/BFM-snow-sync/.direnv/python-3.10.4/lib/python3.10/site-packages/pulumi/output.py", line 194, in run
transformed: Input[U] = func(value)
File "/Users/username/cse-dev/git/BFM-snow-sync/./__main__.py", line 65, in <lambda>
lambda instance_ip: command.local.run(
File "/Users/username/cse-dev/git/BFM-snow-sync/.direnv/python-3.10.4/lib/python3.10/site-packages/pulumi_command/local/run.py", line 246, in run
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
AttributeError: type object 'InvokeOptions' has no attribute 'merge'
error: an unhandled error occurred: Program exited with non-zero exit code: 1
glamorous-whale-27111
09/06/2022, 11:58 PMpolite-carpenter-13290
09/07/2022, 6:54 PMpulumi down
I have to wait until all k8s resources will be deleted however it’d be enough to just delete compute instance with k3s cluster. Is there any way to implement such logic with pulumi?salmon-motherboard-78006
09/08/2022, 4:52 PMs3.Bucket(f"{stack}-data-lake",
bucket=f"{stack}-data-lake",
acl="private",
versioning=s3.BucketVersioningArgs(
enabled=True,
),
server_side_encryption_configuration=s3.BucketServerSideEncryptionConfigurationArgs(
rule=s3.BucketServerSideEncryptionConfigurationRuleArgs(
apply_server_side_encryption_by_default=s3.BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs(
kms_master_key_id=s3_kms_key.arn,
sse_algorithm="aws:kms",
),
),
))
What am I missing?lively-rain-14200
09/09/2022, 6:37 AMpulumi
and having an issue with the doc:
https://www.pulumi.com/docs/guides/crosswalk/aws/eks/#provisioning-a-new-eks-cluster
Running the second code example present at that address (the example with nginx
) crashes at the deployment
object creations and returns:
File "/home/tolki/.cache/pypoetry/virtualenvs/locarise-rest-api-LW45l3EZ-py3.9/lib/python3.9/site-packages/pulumi/resource.py", line 922, in __init__
raise ValueError(
ValueError: Attempted to register resource kubernetes:apps/v1:Deployment with a provider for 'Calling __str__ on an Output[T] is not supported.
To get the value of an Output[T] as an Output[str] consider:
1. o.apply(lambda v: f"prefix{v}suffix")
See <https://pulumi.io/help/outputs> for more details.
This function may throw in a future version of Pulumi.'
Am I doing something wrong or is the doc wrong?better-agent-38563
09/12/2022, 2:11 PMabundant-oxygen-203
09/12/2022, 8:14 PMaws:s3:Bucket (my-bucket):
error: 1 error occurred:
* error configuring Terraform AWS Provider: error validating provider credentials: error calling sts:GetCallerIdentity: operation error STS: GetCallerIdentity, exceeded maximum number of attempts, 9, https response error StatusCode: 0, RequestID: , request send failed, Post "<https://sts.af-south-1.amazonaws.com/>" dial tcp: lookup <http://sts.af-south-1.amazonaws.com|sts.af-south-1.amazonaws.com> on 192.168.0.1:53: no such host
brave-motorcycle-67487
09/12/2022, 11:02 PMpulumi new aws-python
. After looking at it, I realized I wanted to use the native python bindings for this, so I `rm -r`ed the directory and attempted to recreate it with pulumi new aws-native-python
. This isn't letting me do so though because the old project still exists in pulumi.com's state. I'm not sure how to delete it though because there doesn't seem to be any way to do that from the web ui, and I don't have any of the configuration files that told the cli about the project and stack. (There are no resources in it - I never ran pulumi up
- so it's just the project itself that I need to delete)witty-vegetable-61961
09/13/2022, 1:51 PMPermissions = new RabbitMQ.Inputs.PermissionsPermissionsArgs
brave-motorcycle-67487
09/13/2022, 4:33 PMpulumi up
appears to be waiting on the containers in a service coming up successfully - since something isn't configured correctly, that means it's just hanging forever. I can SIGINT it, but then I have orphaned resources in AWS that Pulumi isn't tracking and I have to delete them manually. What's the right way for me to deal with this situation?curved-eye-56312
09/14/2022, 10:57 AMPulumi.<stack_name>.yaml
file I want to declare the following object:
<stack_name>:blobContainers:
1:
name: container_name1
accessLevel: Container
2:
name: container_name2
accessLevel: Blob
3:
name: container_name3
accessLevel: Container
I understand that to retrieve this object from my configuration file I need to use the following (using Typescript):
const containers = config.requireObject("blobContainers");
However, when I try to iterate over my object and access name
for example, I am not able to due to the object's type.
What is the correct way to iterate over this object?salmon-motherboard-78006
09/14/2022, 8:36 PMpulumi,export
statements in stack A.
Now, I have pulumi.StackReference
in stack B to reference the export statements of stack A.
Is it possible?agreeable-whale-35898
09/17/2022, 1:17 PMpulumi up
, is there a way for it to print my `Pulumi.Aws.Ec2.Instance`'s PublicIp
property? I couldn't find it in docs, or maybe I just misunderstand some concept (e.g. "Outputs", but I'm not sure how to have it printed each time I run pulumi up
).
I tried e.g. (in C#): Output.All(server.PublicIp)
and similar things, but nothing gets printed upon pulumi up
busy-kitchen-1186
09/18/2022, 8:07 AMkind-napkin-54965
09/18/2022, 2:59 PMpulumi refresh
in the interactive mode, if I am using the automation api? I have stack.refresh(on_output=print)
in my code. Do I need to adjust code somehow, or is interactive mode not available for automation api? Thanks!crooked-river-11449
09/19/2022, 10:04 AMpulumi up
I get could not validate provider configuration
invalid or unknown key
. I am using Pulumi version 3.39 and I am deploying a YAML project to my localstack
on AWS. Any advice would be much appreciated thank you.crooked-river-11449
09/19/2022, 10:07 AMconfig:
aws:accessKey: "test"
aws:secretKey: "test"
aws:profile: "localstack"
aws:region: "eu-central-1"
aws:s3UsePathStyle: "true"
aws:skipCredentialsValidation: "true"
aws:skipRequestingAccountId: "true"
eager-pilot-22899
09/19/2022, 2:05 PMlemon-intern-77136
09/19/2022, 3:30 PMadventurous-television-3865
09/20/2022, 4:50 PMsparse-intern-71089
09/21/2022, 4:01 PMkind-napkin-54965
09/21/2022, 5:37 PMgitlab:index:Project (clientwebsite):
error: 1 error occurred:
* GET <https://gitlab.com/api/v4/user>: 401 {error: invalid_token}, {error_description: Token is expired. You can either do re-authorization or token refresh.} error: 1 error occurred:
* GET <https://gitlab.com/api/v4/user>: 401 {error: invalid_token}, {error_description: Token is expired. You can either do re-authorization or token refresh.}
I recreated the token - it did not help.... Maybe old token is still being used for some reason? How would I debug to get exact request that is being made to gitlab? Thanks!sparse-intern-71089
09/23/2022, 10:53 AMambitious-daybreak-8631
09/26/2022, 8:09 AMmicroscopic-painting-1312
09/27/2022, 6:02 PMbrash-restaurant-84207
09/28/2022, 9:00 AMkind-napkin-54965
09/30/2022, 12:04 PMpulumi destroy --stack beautynew/gcp-pubsub-new/devnew
ir failing saying error: could not get cloud url: could not load current project: expected an object
. Thanks!glamorous-australia-21342
10/04/2022, 7:36 PMsnaptshotRedirectCnames not empty!
######################
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.
######################
######################
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..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.
######################
Function
export function snapshotRediretionCnames(subDomains: string[]) {
const cnames: string[] = []
subDomains.forEach(function (subDomain) {
// Does subdomain have -v ?
if (subDomain.indexOf('-v') > -1) {
// Does it exist in cnames?
if (cnames.length > 0) {
let networkInCnames = false
let cnameToReplace = ''
cnames.forEach(function (cname) {
const subDomainNetwork = subDomain.split('-v')[0]
if (cname.indexOf(subDomainNetwork) > -1) {
networkInCnames = true
cnameToReplace = cname
}
})
// If network is in cname
if (networkInCnames) {
// Does is the version higher than what exists?
const subDomainVersion = subDomain.replace(/[^0-9]/g, '')
const cnameVersion = cnameToReplace.replace(/[^0-9]/g, '')
if (subDomainVersion < cnameVersion) {
// If the subDomain is newer than the cname we're replacing it
const index = cnames.indexOf(cnameToReplace)
if (index !== -1) {
cnames[index] = subDomain
}
}
} else {
cnames.push(subDomain)
}
} else {
cnames.push(subDomain)
}
}
})
return pulumi.interpolate`${cnames}`
}
Caller:
const allSubdomains = shotsDeployments.map((s) => s.subdomain!)
shotsDeployments.forEach(
(shot) =>
new TezosShotsDeployment(
{ ...shot, allSubdomains },
{ provider: cluster.provider }
)
)
const snapshotRedirectionCnames = snapshotRediretionCnames(allSubdomains)
if(snapshotRedirectionCnames){
snapshotRedirectionCnames.apply(cnames=>{
cnames.split("\n").forEach(function(cname){
const output = pulumi.interpolate`${cname}`
console.log(`snaptshotRedirectCnames not empty!`)
console.log(`######################`)
console.log(`${snapshotRedirectionCnames}`)
console.log(`######################`)
const network = output.apply(cname => pulumi.interpolate`${cname.split('-v')[0]}`)
console.log(`######################`)
console.log(`${network}.${xtzshotsZone.name}`)
console.log(`######################`)
})
})
}
I've tried every combination of pulumi.interpolate
and output.apply
that I can think of, but I can't seem to get this object parsed from an Output<T> to a string. If someone could take a look and let me know what I could be doing wrong, that would be most appreciated. 😄