terraform-provider-ibm
terraform-provider-ibm copied to clipboard
ibm_is_subnet is missing subnet ID that is present in ibm_is_subnets
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
Description
The data source ibm_is_subnet
should include the subnet ID. It seems the ID is available from the API, it's just not present in the attributes. For example, I have the subnet name but I need to find it's ID, I cannot currently do that.
Nash $ ic is subnet ....worker-1 --output json | jq -r '.id'
0737-140bb607-.....
New or Affected Resource(s)
data.ibm_is_subnet
Potential Terraform Configuration
data "ibm_is_subnet" "example" {
name = "example-vpc"
}
References
- #0000
Hi @Nashluffy ,
data source for subnet contains ID attribute.
data "ibm_is_subnet" "subnet" {
identifier = "*******"
}
this fetches the details of the subnet and also has the attribute 'id' which contains the subnet ID are you referring to a different data source or resource ?
Perhaps the docs are out of date then? I don't see an id
attribute for this data source. My use case is that I want to fetch the ID of a subnet given I only have the name.
https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/is_subnet#attribute-reference
@Nashluffy id
is in the list of attributes https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/is_subnet#id
Hi @Nashluffy are we good to close this issue ?