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

Enhancement : added default routing table id to output parameters of ibm_is_vpc #2286

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

ujjwal-ibm
Copy link
Collaborator

@ujjwal-ibm ujjwal-ibm commented Feb 26, 2021

Added an output parameter "default_routing_table" which returns the id of the default routing table created

Relates OR Closes #2249

@@ -517,6 +524,11 @@ func vpcGetByName(d *schema.ResourceData, meta interface{}, name string) error {
} else {
d.Set(isVPCDefaultNetworkACL, nil)
}
if vpc.DefaultRoutingTable != nil {
d.Set(isVPCDefaultRoutingTable, *vpc.DefaultRoutingTable.ID)
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove else not required if you don't set by default terraform will set to null

@@ -89,6 +90,14 @@ func resourceIBMISVPC() *schema.Resource {
Description: "Default network ACL",
},

isVPCDefaultRoutingTable: {
Type: schema.TypeString,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isVPCDefaultRoutingTable here should be only computed and we need to set in Read Method similar to datasource

enhancement : added an output parameter returning the default routing table id
@ujjwal-ibm ujjwal-ibm changed the title Enhancement routing table Enhancement : added default routing table id to output parameters of ibm_is_vpc Mar 2, 2021
@hkantare hkantare merged commit 7dae080 into IBM-Cloud:master Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vpc default routing table support
2 participants