Skip to content

Commit

Permalink
network - fix tests for 4.0 (#27063)
Browse files Browse the repository at this point in the history
* network - fix tests for 4.0

* update note to follow O+C formatting

---------

Co-authored-by: Steph <[email protected]>
  • Loading branch information
mbfrahry and stephybun authored Aug 16, 2024
1 parent 00b2264 commit 09bc334
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion internal/services/network/network_interface_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func dataSourceNetworkInterfaceRead(d *pluginsdk.ResourceData, meta interface{})

d.Set("applied_dns_servers", appliedDNSServers)
d.Set("dns_servers", dnsServers)
if !features.FourPointOh() {
if !features.FourPointOhBeta() {
d.Set("enable_ip_forwarding", props.EnableIPForwarding)
d.Set("enable_accelerated_networking", props.EnableAcceleratedNetworking)
}
Expand Down
9 changes: 4 additions & 5 deletions internal/services/network/private_endpoint_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/features"
"github.com/hashicorp/terraform-provider-azurerm/internal/locks"
cosmosParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse"
Expand Down Expand Up @@ -204,10 +203,10 @@ func resourcePrivateEndpoint() *pluginsdk.Resource {
},
// lintignore:S013
"member_name": {
Type: pluginsdk.TypeString,
Required: features.FourPointOhBeta(),
Optional: !features.FourPointOhBeta(),
Computed: !features.FourPointOhBeta(),
Type: pluginsdk.TypeString,
// NOTE: O+C This value should remain optional computed as there are certain cases where Azure will error if you pass in a member id when it isn't expecting one.
Optional: true,
Computed: true,
ForceNew: true,
ValidateFunc: validation.StringIsNotEmpty,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func TestAccPrivateEndpoint_privateDnsZoneUpdate(t *testing.T) {
})
}

func TestAccPrivateEndpoint_statiIpAddress(t *testing.T) {
func TestAccPrivateEndpoint_staticIpAddress(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_private_endpoint", "test")
r := PrivateEndpointResource{}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ resource "azurerm_subnet" "test" {
address_prefixes = [cidrsubnet("10.5.1.0/24", 4, count.index)]
private_endpoint_network_policies = "Disabled"
enforce_private_link_service_network_policies = true
private_link_service_network_policies_enabled = true
service_endpoints = [
"Microsoft.AzureActiveDirectory",
Expand Down

0 comments on commit 09bc334

Please sign in to comment.