diff --git a/azurerm/internal/features/two_point_oh.go b/azurerm/internal/features/two_point_oh.go index 85602f6b524e..d028d8e88378 100644 --- a/azurerm/internal/features/two_point_oh.go +++ b/azurerm/internal/features/two_point_oh.go @@ -1,10 +1,5 @@ package features -import ( - "os" - "strings" -) - // SupportsTwoPointZeroResources returns whether the new VM and VMSS resources from 2.0 // should be supported // @@ -24,5 +19,5 @@ import ( // Operators wishing to beta-test these resources can opt-into them in 1.x versions of the // Azure Provider by setting the Environment Variable 'ARM_PROVIDER_TWOPOINTZERO_RESOURCES' to 'true' func SupportsTwoPointZeroResources() bool { - return strings.EqualFold(os.Getenv("ARM_PROVIDER_TWOPOINTZERO_RESOURCES"), "true") + return true } diff --git a/azurerm/internal/features/two_point_oh_test.go b/azurerm/internal/features/two_point_oh_test.go deleted file mode 100644 index 25e96da83c86..000000000000 --- a/azurerm/internal/features/two_point_oh_test.go +++ /dev/null @@ -1,55 +0,0 @@ -package features - -import ( - "os" - "testing" -) - -func TestTwoPointZero(t *testing.T) { - testData := []struct { - name string - value string - expected bool - }{ - { - name: "unset", - value: "", - expected: false, - }, - { - name: "disabled lower-case", - value: "false", - expected: false, - }, - { - name: "disabled upper-case", - value: "FALSE", - expected: false, - }, - { - name: "enabled lower-case", - value: "true", - expected: true, - }, - { - name: "enabled upper-case", - value: "TRUE", - expected: true, - }, - { - name: "invalid", - value: "pandas", - expected: false, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Test %q..", v.name) - - os.Setenv("ARM_PROVIDER_TWOPOINTZERO_RESOURCES", v.value) - actual := SupportsTwoPointZeroResources() - if v.expected != actual { - t.Fatalf("Expected %t but got %t", v.expected, actual) - } - } -}