bland-pharmacist-96854
01/24/2023, 12:36 PMbland-pharmacist-96854
01/24/2023, 12:38 PMpulumi.Output.concat()
or pulumi.Output.format()
for a keybland-pharmacist-96854
01/24/2023, 12:38 PMearly-cat-34152
01/26/2023, 9:35 AMpulumi_command.local.Command
? For some reason, after altering the command and adding an asset_paths
argument, creating (and updating) this Resource fails all the time. When I run the command outside of Pulumi it works fine and has a zero exit status. I want to find out which exit status is returned then, and if it's a Pulumi-internal error (I suspect so), I want to know which one.kind-jelly-61624
01/26/2023, 9:05 PMstrong-helmet-83704
01/27/2023, 2:41 AMgreat-sunset-355
01/31/2023, 12:33 PMdef conditional_role_not_exists():
try:
result = aws.iam.get_role("conditional_role_not_exists")
if result.id:
return
except:
pass
# create if it does not exist
aws.iam.Role("conditional_role_not_exists", args=aws.iam.RoleArgs(assume_role_policy="{}"))
conditional_role_not_exists()
quaint-hydrogen-7228
01/31/2023, 2:13 PMbland-pharmacist-96854
01/31/2023, 3:26 PMbland-pharmacist-96854
01/31/2023, 3:26 PMbroad-holiday-50009
01/31/2023, 11:07 PMerror: Duplicate resource URN 'urn:pulumi:dev::HNO1::aws:ec2/routeTableAssociation:RouteTableAssociation::rta-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.-public'; try giving it a unique name
This is the code that is producing the error, I think I know what has caused it but I don't know how to fix it.
pub_rtas = []
for pub_subnet in pub_subnets:
rta_name = f"rta-{pub_subnet.id}-public"
pub_rtas.append(rta_name)
ec2.RouteTableAssociation(
rta_name,
subnet_id = pub_subnet.id,
gateway_id = igw.id,
route_table_id="HNO-route-table-public",
)
acoustic-helmet-58862
02/07/2023, 12:02 PMthankful-stone-34269
02/07/2023, 10:54 PMvenv
directory for me?adamant-author-732
02/08/2023, 10:53 AMOutput[str | None]
and another one (B) that expects an input of Input[str] | None
. The only way I can think to pass this data from A
to B
is via A.attribute.apply(B(… some arguments here…))
. However, I know that Pulumi discourages creating resources inside an apply()
. Is there another way to convert Output[str | None]
to Input[str] | None
?acoustic-helmet-58862
02/08/2023, 11:04 AMthankful-stone-34269
02/08/2023, 11:37 PMpulumi import
doesn't just create code for an existing resource, it also imports that existing physical resource into your current stack. So if you are trying to use import
to learn how to make a similar resources, beware. Because your dev stack will get a reference to the actual real infra that's in use. And if you're like me you won't understand why your dev stack has this thing you never created with pulumi up
and when you finally succeed in getting it out of your stack, you take down the system. :(acoustic-helmet-58862
02/09/2023, 12:01 PMthankful-stone-34269
02/14/2023, 2:04 AMpulumi_eks.eks.Cluster
and pulumi_aws.eks.Cluster
?wide-cat-87818
02/14/2023, 9:00 AMFile "/home/marcel/.cache/pypoetry/virtualenvs/moneymeets-pulumi-2nIJVDlj-py3.11/lib/python3.11/site-packages/pulumi_aws/get_caller_identity.py", line 100, in get_caller_identity
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'InvokeOptions' has no attribute 'merge'
It was working with older versions. I’ve upgraded all my packages and it is not working anymore. I’m using the following versions:
• Python 3.11
• Pulumi 3.54.0
• pulumi_aws 5.29.1
Problematic line:
https://github.com/pulumi/pulumi-aws/blob/master/sdk/python/pulumi_aws/get_caller_identity.py#L100
Perhaps it is enough to update to provider? https://github.com/pulumi/pulumi-aws/issues/2361
Any ideas?dry-keyboard-94795
02/14/2023, 1:33 PMStackReference.get_output_details
• How do we call it in our stacks? The method is async.
• How come our code needs to care if an output is secret or not? (interface has both value
and secret_value
adorable-garden-93195
02/14/2023, 5:12 PM...
port = openstack.networking.Port(
port_name,
name=port_name,
network_id=net_objects[net_name]["network"],
port_security_enabled=False,
fixed_ips=[
{
"subnet_id": net_objects[net_name]["subnet"],
"ip_address": net_port["ip"],
}
],
)
ports_list.append(port)
port_names.append(port_name)
if net_port["is_float"] is True:
# If the port has a floating point IP assigned to it, then
# create the relevant resources
float_ip = openstack.networking.FloatingIp(
f"{port_name}_float",
pool="public",
)
float_ip_assoc = openstack.networking.FloatingIpAssociate(
f"{port_name}_float_assoc",
floating_ip=float_ip.address,
port_id=port.id,
)
pulumi.export(f"float_ip_{port_name}", float_ip.address)
On initial stack deploy, I create reference a library that has the relevant port info, and it build sthe port and float resources without issue. When I change the IP of a port in the library (seperate yaml file) and run pulumi up
again, it DOES update the IP, but doesn't re-associate a new floating IP. (The existing floating IP resource still exists in Openstack and is mapped to the old IP). I'm just not sure how to delete the old association so I can create the new one in the python program.
Hopefully that makes sense, thanks for the help.gorgeous-minister-41131
02/16/2023, 12:42 AMstr
, and their values could be pulumi.Output[str]
?future-eve-16214
02/16/2023, 10:48 PMasyncio.run
but I get RuntimeError: asyncio.run() cannot be called from a running event loop
rhythmic-branch-12845
02/20/2023, 7:16 AMrules_source_list
argument, you have to assign it to a `
aws.networkfirewall.RuleGroupRuleGroupRulesSourceRulesSourceListArgs(...
function callwhite-forest-65475
02/20/2023, 4:23 PM# Apply the Argo CD installation manifest from a URL
argocd_install_manifest = k8s.yaml.ConfigGroup(
"argocd-install-manifest",
files=["<https://raw.githubusercontent.com/argoproj/argo-cd/master/manifests/install.yaml>"],
transformations=[set_namespace],
opts=opts,
)
# Extract the argocd-server Service and register it's IP address as an output.
argocd_service = argocd_install_manifest.get_resource("service", "argocd-server")
argocd_service_ip = argocd_service.status.loadBalancer.ingress[0].ip
pulumi.export("argocd-service-ip", argocd_service_ip)
This code fails with an error saying that it can’t find a service by that name. I’ve also tried calling k8s.core.v1.Service.get(“argocd-server”, None, opts) but the second argument, ‘id’, it’s not clear to me what I should supply it an None does not work. The service definitely does exist, although to be fair I think it is currently a ClusterIP service, but the error seems to be directly related to service not being found as pulumi up
errors out with this final stack frame:
File "/Users/erich/Library/Caches/pypoetry/virtualenvs/blumeops-yejfY_2Q-py3.11/lib/python3.11/site-packages/pulumi/output.py", line 263, in lift
return UNKNOWN if isinstance(v, Unknown) else cast(Any, v)[key]
~~~~~~~~~~~~^^^^^
KeyError: 'service:argocd-server'
Can anyone help me figure out how to extract this service’s IP?white-forest-65475
02/20/2023, 9:26 PMDiagnostics:
kubernetes:core/v1:Service (argocd-server):
error: Preview failed: resource 'blumeops-de4233d6/argocd-server' does not exist
This is the minimal amount of code I’m using which will generate the error… recall from above that argocd_install_manifest is derived from a yaml manifest file ingested by a k8s.yaml.ConfigGroup
.
argocd_service = k8s.core.v1.Service.get(
"argocd-server",
pulumi.Output.concat(namespace.metadata.name, "/argocd-server"),
opts=pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(depends_on=argocd_install_manifest)),
)
Am I missing something here? How can I tell pulumi that it’s OK if the service doesn’t exist yet… it should just wait until the manifest is ready?sparse-fountain-4597
02/22/2023, 4:53 PMgorgeous-minister-41131
02/24/2023, 12:53 AMvictorious-exabyte-70545
02/24/2023, 8:20 PMfresh-spring-82225
02/25/2023, 12:56 AMfresh-spring-82225
02/25/2023, 12:56 AM