Skip to content

Commit

Permalink
AVX-50899: fqdn_lan_interface is not needed for firenet fqdn association
Browse files Browse the repository at this point in the history
  • Loading branch information
shanxu2017 committed Mar 7, 2024
1 parent a0e58f0 commit b92f68d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
3 changes: 0 additions & 3 deletions aviatrix/data_source_aviatrix_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -789,16 +789,13 @@ func dataSourceAviatrixGatewayRead(d *schema.ResourceData, meta interface{}) err
d.Set("renegotiation_interval", -1)
}

fqdnGatewayLanInterface := fmt.Sprintf("av-nic-%s_eth1", gw.GwName)
fqdnLanCidr, ok := gw.ArmFqdnLanCidr[gw.GwName]
if ok && goaviatrix.IsCloudType(gw.CloudType, goaviatrix.AzureArmRelatedCloudTypes) {
d.Set("fqdn_lan_interface", fqdnGatewayLanInterface)
d.Set("fqdn_lan_cidr", fqdnLanCidr)
} else if goaviatrix.IsCloudType(gw.CloudType, goaviatrix.GCPRelatedCloudTypes) {
d.Set("fqdn_lan_vpc_id", gw.BundleVpcInfo.LAN.VpcID)
d.Set("fqdn_lan_cidr", strings.Split(gw.BundleVpcInfo.LAN.Subnet, "~~")[0])
} else {
d.Set("fqdn_lan_interface", "")
d.Set("fqdn_lan_cidr", "")
}

Expand Down
6 changes: 1 addition & 5 deletions aviatrix/resource_aviatrix_firewall_instance_association.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,7 @@ func resourceAviatrixFirewallInstanceAssociationRead(d *schema.ResourceData, met
if instanceInfo.VendorType == "Aviatrix FQDN Gateway" {
d.Set("vendor_type", "fqdn_gateway")
d.Set("firewall_name", "")
if strings.HasPrefix(instanceInfo.LanInterface, "eni-") || fireNetDetail.CloudType == strconv.Itoa(goaviatrix.GCP) {
d.Set("lan_interface", "")
} else {
d.Set("lan_interface", instanceInfo.LanInterface)
}
d.Set("lan_interface", "")
d.Set("management_interface", "")
d.Set("egress_interface", "")
} else {
Expand Down
3 changes: 0 additions & 3 deletions aviatrix/resource_aviatrix_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -1496,16 +1496,13 @@ func resourceAviatrixGatewayRead(d *schema.ResourceData, meta interface{}) error
return fmt.Errorf("setting 'monitor_exclude_list' to state: %v", err)
}

fqdnGatewayLanInterface := fmt.Sprintf("av-nic-%s_eth1", gw.GwName)
fqdnLanCidr, ok := gw.ArmFqdnLanCidr[gw.GwName]
if ok && goaviatrix.IsCloudType(gw.CloudType, goaviatrix.AzureArmRelatedCloudTypes) {
d.Set("fqdn_lan_interface", fqdnGatewayLanInterface)
d.Set("fqdn_lan_cidr", fqdnLanCidr)
} else if goaviatrix.IsCloudType(gw.CloudType, goaviatrix.GCPRelatedCloudTypes) {
d.Set("fqdn_lan_vpc_id", gw.BundleVpcInfo.LAN.VpcID)
d.Set("fqdn_lan_cidr", strings.Split(gw.BundleVpcInfo.LAN.Subnet, "~~")[0])
} else {
d.Set("fqdn_lan_interface", "")
d.Set("fqdn_lan_cidr", "")
}

Expand Down

0 comments on commit b92f68d

Please sign in to comment.