Skip to content

Commit

Permalink
Remove deprecated resource - is_vpc_route (#4496)
Browse files Browse the repository at this point in the history
* removed complete support for the VPC route.

* Update resource_ibm_is_vpc_address_prefix.go

* Delete is_vpc_route.html.markdown

* removing unused variable and the validation for the same.

* Update resource_ibm_is_vpn_gateway.go
  • Loading branch information
BShrivastav authored Apr 15, 2023
1 parent c2a67c8 commit aae5986
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 645 deletions.
9 changes: 0 additions & 9 deletions examples/ibm-is-ng/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ resource "ibm_is_vpc_address_prefix" "testacc_vpc_address_prefix" {
is_default = true
}

resource "ibm_is_vpc_route" "route1" {
name = "route1"
vpc = ibm_is_vpc.vpc1.id
zone = var.zone1
destination = "192.168.4.0/24"
next_hop = "10.240.0.4"
depends_on = [ibm_is_subnet.subnet1]
}

resource "ibm_is_subnet" "subnet1" {
name = "subnet1"
vpc = ibm_is_vpc.vpc1.id
Expand Down
8 changes: 1 addition & 7 deletions ibm/acctest/acctest.go
Original file line number Diff line number Diff line change
Expand Up @@ -698,16 +698,10 @@ func init() {
fmt.Println("[INFO] Set the environment variable IS_VOLUME_PROFILE for testing ibm_is_volume_profile else it is set to default value 'general-purpose'")
}

ISRouteDestination = os.Getenv("SL_ROUTE_DESTINATION")
if ISRouteDestination == "" {
ISRouteDestination = "192.168.4.0/24"
fmt.Println("[INFO] Set the environment variable SL_ROUTE_DESTINATION for testing ibm_is_vpc_route else it is set to default value '192.168.4.0/24'")
}

ISRouteNextHop = os.Getenv("SL_ROUTE_NEXTHOP")
if ISRouteNextHop == "" {
ISRouteNextHop = "10.240.0.0"
fmt.Println("[INFO] Set the environment variable SL_ROUTE_NEXTHOP for testing ibm_is_vpc_route else it is set to default value '10.0.0.4'")
fmt.Println("[INFO] Set the environment variable SL_ROUTE_NEXTHOP else it is set to default value '10.0.0.4'")
}

IcdDbRegion = os.Getenv("ICD_DB_REGION")
Expand Down
2 changes: 0 additions & 2 deletions ibm/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,6 @@ func Provider() *schema.Provider {
"ibm_is_vpn_gateway_connection": vpc.ResourceIBMISVPNGatewayConnection(),
"ibm_is_vpc": vpc.ResourceIBMISVPC(),
"ibm_is_vpc_address_prefix": vpc.ResourceIBMISVpcAddressPrefix(),
"ibm_is_vpc_route": vpc.ResourceIBMISVpcRoute(),
"ibm_is_vpc_routing_table": vpc.ResourceIBMISVPCRoutingTable(),
"ibm_is_vpc_routing_table_route": vpc.ResourceIBMISVPCRoutingTableRoute(),
"ibm_is_vpn_server": vpc.ResourceIBMIsVPNServer(),
Expand Down Expand Up @@ -1384,7 +1383,6 @@ func Validator() validate.ValidatorDict {
"ibm_is_subnet_reserved_ip": vpc.ResourceIBMISSubnetReservedIPValidator(),
"ibm_is_volume": vpc.ResourceIBMISVolumeValidator(),
"ibm_is_address_prefix": vpc.ResourceIBMISAddressPrefixValidator(),
"ibm_is_route": vpc.ResourceIBMISRouteValidator(),
"ibm_is_vpc": vpc.ResourceIBMISVPCValidator(),
"ibm_is_vpc_routing_table": vpc.ResourceIBMISVPCRoutingTableValidator(),
"ibm_is_vpc_routing_table_route": vpc.ResourceIBMISVPCRoutingTableRouteValidator(),
Expand Down
7 changes: 0 additions & 7 deletions ibm/service/vpc/resource_ibm_is_vpc_address_prefix.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,6 @@ func ResourceIBMISAddressPrefixValidator() *validate.ResourceValidator {
Regexp: `^([a-z]|[a-z][-a-z0-9]*[a-z0-9])$`,
MinValueLength: 1,
MaxValueLength: 63})
validateSchema = append(validateSchema,
validate.ValidateSchema{
Identifier: isVPCRouteDestinationCIDR,
ValidateFunctionIdentifier: validate.ValidateCIDRAddress,
Type: validate.TypeString,
ForceNew: true,
Required: true})
validateSchema = append(validateSchema,
validate.ValidateSchema{
Identifier: isVPCAddressPrefixCIDR,
Expand Down
Loading

0 comments on commit aae5986

Please sign in to comment.