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_subnet returns the incorrect subnet ID #4872

Closed
dprosperibm opened this issue Oct 19, 2023 · 0 comments · Fixed by #4892
Closed

ibm_is_subnet returns the incorrect subnet ID #4872

dprosperibm opened this issue Oct 19, 2023 · 0 comments · Fixed by #4892
Assignees
Labels
service/VPC Infrastructure Issues related to the VPC Infrastructure

Comments

@dprosperibm
Copy link

dprosperibm commented Oct 19, 2023

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

Affected Resource(s)

  • ibm_is_subnet

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_subnet" "z3" {
  name = "sn-20231016-03"
}

Expected Behavior

I expect to the the ID for the subnet in the VPC I am currently working with.

Actual Behavior

I get back the ID for the subnet that is in a DIFFERENT VPC. That is because the data resource does not allow me to specify which VPC I want this data from. It seems to pick a VPC at random or the last one created.

Steps to Reproduce

  1. This assume that you are attempting to use the provider against an existing VPC. But to get started. Create two different VPCs in the same region using the Console UI. Use the default provided by the console to generate the subnet names.
  2. Configure your Terraform template for your region and provider
  3. Insert the code snippet above
  4. Run terraform apply
  5. You should get the subnet id back, but that subnet id is for which one of the two VPCs? 50/50 it is the one you expected or needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/VPC Infrastructure Issues related to the VPC Infrastructure
Projects
None yet
2 participants