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_vpc_default_routing_table and ibm_is_vpc_default_routing_table differences #2983

Closed
3 tasks
powellquiring opened this issue Aug 12, 2021 · 7 comments · Fixed by #3489
Closed
3 tasks
Labels
service/VPC Infrastructure Issues related to the VPC Infrastructure

Comments

@powellquiring
Copy link

The are two different ways to get at a routing table. But the attributes are different. Below is the focus on the attributes that interested me, but all of the attributes should be examined.

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/is_vpc_routing_table

Attribute reference

  • id - (String) The routing table ID. The ID is composed of <vpc_id>/<vpc_route_table_id> of the VPC route.
  • routing_table - (String) The generated routing table ID.

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/is_vpc_default_routing_table

  • default_routing_table - (String) The unique identifier for the default routing table.

  • id - (String) The unique ID for the default routing table.

  • Are the resources really as different as they seem

  • what is the diff between ibm_is_vpc_default_routing_table.id and ibm_is_vpc_default_routing_table.default_routing_table

  • what is the diff between the ibm_is_vpc_default_routing_table.id and is_vpc_routing_table.id

Expected: The attribute reference section of these resources to be almost identical
Actual: differences.

@kavya498 kavya498 added the service/VPC Infrastructure Issues related to the VPC Infrastructure label Aug 13, 2021
@astha-jain
Copy link
Contributor

I'll take a look

@uibm
Copy link
Collaborator

uibm commented Aug 16, 2021

@powellquiring

Are the resources really as different as they seem

First one(https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/is_vpc_routing_table) is a resource, second one(https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/is_vpc_default_routing_table) is a datasource.

what is the diff between ibm_is_vpc_default_routing_table.id and ibm_is_vpc_default_routing_table.default_routing_table

the id generated for a connected resource is usually a combination, so <vpc_id>/<vpc_route_table_id> is the id wrt to the resource, used for importing the resource.

what is the diff between the ibm_is_vpc_default_routing_table.id and is_vpc_routing_table.id

One is the id of the default Routing table of the vpc (data source) and one is the terraform generated id of the resource to keep the import easier.

@powellquiring
Copy link
Author

I'm not convinced that the two resources should be different. They are both routing tables.

Either way the documentation for these needs to be improved. I should be able to read the docs and figure out the attributes. These descriptions are the same, right:

  • default_routing_table - (String) The unique identifier for the default routing table.
  • id - (String) The unique ID for the default routing table.

@uibm
Copy link
Collaborator

uibm commented Aug 16, 2021

@kavya498
Copy link
Collaborator

@powellquiring , Are we good to close?
Thanks.

@powellquiring
Copy link
Author

The are two different ways to get at a routing table. But the attributes are different. Below is the focus on the attributes that interested me, but all of the attributes should be examined.

ibm_is_vpc_default_routing_table = {
  "created_at" = "2021-12-21T16:18:17.000Z"
  "default_routing_table" = "r006-5dd90323-f8bf-4e34-bf87-df8bad3d6c62"
  "href" = "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-de8d3daf-292b-4bad-8e20-1653747bfa3c/routing_tables/r006-5dd90323-f8bf-4e34-bf87-df8bad3d6c62"
  "id" = "r006-5dd90323-f8bf-4e34-bf87-df8bad3d6c62"
  "is_default" = true
  "lifecycle_state" = "stable"
  "name" = "imitate-showier-jacket-amazingly"
  "resource_type" = "routing_table"
  "route_direct_link_ingress" = false
  "route_transit_gateway_ingress" = false
  "route_vpc_zone_ingress" = false
  "routes" = tolist([])
  "subnets" = tolist([])
  "vpc" = "r006-de8d3daf-292b-4bad-8e20-1653747bfa3c"
}


ibm_is_vpc_routing_table = {
  "created_at" = "2021-12-21T16:18:32.000Z"
  "href" = "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-9ce4d584-00d4-45f8-9ed4-68d57e1b86e4/routing_tables/r006-23901944-4b2f-4457-934a-bf74d677dfcc"
  "id" = "r006-9ce4d584-00d4-45f8-9ed4-68d57e1b86e4/r006-23901944-4b2f-4457-934a-bf74d677dfcc"
  "is_default" = false
  "lifecycle_state" = "stable"
  "name" = "vpc2-route-table"
  "resource_type" = "routing_table"
  "route_direct_link_ingress" = true
  "route_transit_gateway_ingress" = false
  "route_vpc_zone_ingress" = false
  "routing_table" = "r006-23901944-4b2f-4457-934a-bf74d677dfcc"
  "subnets" = tolist([])
  "timeouts" = null /* object */
  "vpc" = "r006-9ce4d584-00d4-45f8-9ed4-68d57e1b86e4"
}

Missing in the docs:

ibm_is_vpc_routing_table = {
  "created_at" = "2021-12-21T16:18:32.000Z"

@kavya498
Copy link
Collaborator

@ujjwal-ibm ,FYI

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
Development

Successfully merging a pull request may close this issue.

4 participants