Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ibm_is_virtual_network_interface_floating_ip: inconsistent behaviour returns null instead of error #5757

Closed
sean-freeman opened this issue Nov 1, 2024 · 2 comments · Fixed by #5762
Labels
service/Resource Management Issues related to Resource Manager or Resource controller Issues service/VPC Infrastructure Issues related to the VPC Infrastructure

Comments

@sean-freeman
Copy link

sean-freeman commented Nov 1, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform IBM Provider Version

Terraform 1.5.5 with all Terraform Providers since this data resource was added

Affected Resource(s)

  • ibm_is_virtual_network_interface_floating_ip

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

data "ibm_is_virtual_network_interface_floating_ip" "test" {
  virtual_network_interface = "xxxx"
  floating_ip = "xxxx"
}

Debug Output

Return Code 0, without stderr, and all data fields incorrectly return as null:

    "address": null
    "crn": null
    "deleted": null
    "floating_ip": null
    "href": null
    "id": null
    "name": null
    "virtual_network_interface": null

Expected Behavior

Consistency with all other data source behaviour, such as:

  • data "ibm_resource_group" prints to stderr [ERROR] Given Resource Group is not found in the account
  • data "ibm_is_ssh_key" prints to stderr [ERROR] No SSH Key found with name NAME_HERE
  • data "ibm_is_vpc" prints to stderr [ERROR] No VPC found with name NAME_HERE
  • data "ibm_is_subnet" prints to stderr [ERROR] No subnet found with name (NAME_HERE)

In this case it should be:

stderr [ERROR] No Virtual Network Interface to Floating IP attachment found for the resource IDs

Steps to Reproduce

  1. terraform apply
@github-actions github-actions bot added service/Resource Management Issues related to Resource Manager or Resource controller Issues service/VPC Infrastructure Issues related to the VPC Infrastructure labels Nov 1, 2024
@ujjwal-ibm
Copy link
Collaborator

looking at it

@ujjwal-ibm
Copy link
Collaborator

created a fix to resolve this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/Resource Management Issues related to Resource Manager or Resource controller Issues service/VPC Infrastructure Issues related to the VPC Infrastructure
Projects
None yet
2 participants