Skip to content

Commit

Permalink
Refactring
Browse files Browse the repository at this point in the history
  • Loading branch information
outscale-toa committed Mar 12, 2024
1 parent 7e38fda commit 2a17bf1
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 21 deletions.
4 changes: 0 additions & 4 deletions outscale/data_source_outscale_route_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ func dataSourceOutscaleOAPIRouteTable() *schema.Resource {
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"route_table_to_subnet_link_id": {
Type: schema.TypeString,
Computed: true,
},
"route_table_id": {
Type: schema.TypeString,
Computed: true,
Expand Down
4 changes: 0 additions & 4 deletions outscale/data_source_outscale_route_tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ func dataSourceOutscaleOAPIRouteTables() *schema.Resource {
Type: schema.TypeBool,
Computed: true,
},
"route_table_to_subnet_link_id": {
Type: schema.TypeString,
Computed: true,
},
"link_route_table_id": {
Type: schema.TypeString,
Computed: true,
Expand Down
2 changes: 0 additions & 2 deletions outscale/data_source_outscale_security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,6 @@ func buildOutscaleOAPIDataSourceSecurityGroupFilters(set *schema.Set) oscgo.Filt
}

switch name := m["name"].(string); name {
case "account_ids":
filters.SetAccountIds(filterValues)
case "descriptions":
filters.SetDescriptions(filterValues)
case "inbound_rule_account_ids":
Expand Down
4 changes: 0 additions & 4 deletions outscale/resource_outscale_route_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ func resourceOutscaleOAPIRouteTable() *schema.Resource {
Type: schema.TypeBool,
Computed: true,
},
"route_table_to_subnet_link_id": {
Type: schema.TypeString,
Computed: true,
},
"link_route_table_id": {
Type: schema.TypeString,
Computed: true,
Expand Down
3 changes: 0 additions & 3 deletions outscale/resource_outscale_route_table_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"errors"
"fmt"
"log"
"net/http"
"strings"
"time"
Expand Down Expand Up @@ -59,12 +58,10 @@ func resourceOutscaleOAPILinkRouteTableCreate(d *schema.ResourceData, meta inter
conn := meta.(*OutscaleClient).OSCAPI
subnetID := d.Get("subnet_id").(string)
routeTableID := d.Get("route_table_id").(string)
log.Printf("[INFO] Creating route table link: %s => %s", subnetID, routeTableID)
linkRouteTableOpts := oscgo.LinkRouteTableRequest{
RouteTableId: routeTableID,
SubnetId: subnetID,
}

var resp oscgo.LinkRouteTableResponse
var err error
err = resource.Retry(5*time.Minute, func() *resource.RetryError {
Expand Down
8 changes: 4 additions & 4 deletions outscale/resource_outscale_route_table_link_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,16 @@ const testAccOAPILinkRouteTableConfig = `
}
resource "outscale_subnet" "foo" {
net_id = "${outscale_net.foo.id}"
net_id = outscale_net.foo.id
ip_range = "10.1.1.0/24"
}
resource "outscale_route_table" "foo" {
net_id = "${outscale_net.foo.id}"
net_id = outscale_net.foo.id
}
resource "outscale_route_table_link" "foo" {
route_table_id = "${outscale_route_table.foo.id}"
subnet_id = "${outscale_subnet.foo.id}"
route_table_id = outscale_route_table.foo.id
subnet_id = outscale_subnet.foo.id
}
`

0 comments on commit 2a17bf1

Please sign in to comment.