Open oallart opened 1 year ago
Hello @oallart,
Thanks for bringing up this issue. It appears that the upstream Terraform openstack_compute_floatingip_associate_v2
resource is already supported in our provider. In fact, this resource is currently mapped to resource you linked,openstack.networking.FloatingIpAssociate
, in our codebase, as can be seen here: resources.go Lines 162C5-162C46.
It's clear that the deprecation message can lead confusion among users, particularly due to the resource names not aligning with those used in our Pulumi Openstack provider. To address this issue and improve the messaging, we will work on updating the deprecation message to reflect the correct resource names in our provider.
Thanks for bringing this up!
Thanks for the reply @rquitales
Ok so it IS implemented, I was afraid that my code would eventually be breaking if the depreciation was enforced instead of just warned about.
Thanks for considering this.
I fail to understand why the warning exists if the code is already using V2 ...
"openstack_compute_floatingip_associate_v2": {Tok: openstackResource(computeMod, "FloatingIpAssociate")},
Do we have an update on this? I still see warnings
I fail to understand why the warning exists if the code is already using V2 ...
"openstack_compute_floatingip_associate_v2": {Tok: openstackResource(computeMod, "FloatingIpAssociate")},
I think it's a warning on pulumi_openstack.compute.Instance
and not pulumi_openstack.networking.FloatingIpAssociate
.
See https://www.pulumi.com/registry/packages/openstack/api-docs/compute/instance/#floating_ip_python
Even if you don't specify a floating_ip
value on your Instance object, "something" is still getting passed and triggering the deprecation warning.
Happy to be proven wrong though!
@oallart As a workaround, you can use InterfaceAttach to attach the Port to your Instance, and specify network_mode as "none" on your Instance object.
This works for my use case, but may not be applicable to yours.
I have the same experience as @FullOfSplendor
I have the following:
inst = compute.Instance(
name,
compute.InstanceArgs(
flavor_name="ea.008-0024",
image_name="nesc-baseimages-debian-11-latest",
key_pair="rdodin",
networks=[compute.InstanceNetworkArgs(name=network.name)],
floating_ip=None,
),
pulumi.ResourceOptions(depends_on=[network, subnet]),
floating_ip=None, # I even set it to None explicitly
)
While I am not touching floating_ip on the compute resource, the warning is still emitted. Even when setting it explicitly to None...
What happened?
Up until a few weeks ago, running pulumi python code to attach a floating IP was working without such a warning
warning: floating_ip is deprecated: Use the openstack_compute_floatingip_associate_v2 resource instead
Pulumi does not provide a openstack_compute_floatingip_associate_v2
Terraform does: https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/compute_floatingip_associate_v2
Pulumi only has a https://www.pulumi.com/registry/packages/openstack/api-docs/networking/floatingipassociate/
Expected Behavior
No warning. networking.FloatingIpAssociatev2 should be implemented, matching Terraform's
Steps to reproduce
create a net, subnet, port, attach a floating IP with FloatingIpAssociate The code works but a warnign is produced
Output of
pulumi about
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).